• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] I am having an issue with my code
#1
This is my code, this code is of creating an organization vehicle but it says Unknown Command

Code:
CMD:setorgveh(playerid,params[])

{
new orgid, vid;
if(!IsPlayerAdmin(playerid)) return 0;
if(sscanf(params,"ui",orgid, vid)) return SendClientMessage(playerid, 0xFF4500AA, "USAGE:/setorgveh <orgid> <vid>");

new Float:X,Float:Y,Float:Z,Float:A;
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid,0xFF4500AA,"You aren't in any vehicle.");
    GetVehiclePos(GetPlayerVehicleID(playerid),X,Y,Z);
    GetVehicleZAngle(GetPlayerVehicleID(playerid),A);

    if(vid == 1)
    {
    OrgData[orgid][car1] = CreateVehicle(GetVehicleModel(GetPlayerVehicleID(playerid)),X,Y,Z,A,-1,-1,60);
    }

    if(vid == 2)
    {
    OrgData[orgid][car2] = CreateVehicle(GetVehicleModel(GetPlayerVehicleID(playerid)),X,Y,Z,A,-1,-1,-1);
    }

    if(vid == 3)
    {
    OrgData[orgid][car3] = CreateVehicle(GetVehicleModel(GetPlayerVehicleID(playerid)),X,Y,Z,A,-1,-1,-1);
    }
    if(vid == 4)
    {
    OrgData[orgid][car4] = CreateVehicle(GetVehicleModel(GetPlayerVehicleID(playerid)),X,Y,Z,A,-1,-1,-1);
    }
    if(vid == 5)
    {
    OrgData[orgid][car5] = CreateVehicle(GetVehicleModel(GetPlayerVehicleID(playerid)),X,Y,Z,A,-1,-1,-1);
    }


    new sl[256];
    format(sl,256,"** You have set vehicle id %d to organization vehicle, %s (Carid:%d).",GetVehicleModel(GetPlayerVehicleID(playerid)),vid);
    SendClientMessage(playerid,0x808000AA,sl);

return 1;
}

Full code : https://pastebin.com/KXLubSGP[url=https://pastebin.com/KXLubSGP][/url]
  Reply


Messages In This Thread
I am having an issue with my code - by [Rs]VeNoM - 2023-12-01, 07:43 AM

Forum Jump: