Easy cmd help
#1

I tried to script this one like this but errors

PHP код:

    
if (strcmp("/fix"cmdtexttrue10) == 0)
    {
        if(
Player[playerid][pAdmin] >= 1)
        if(!
IsPlayerInAnyVehicle) return SendClientMessage(playeridCOLOR_YELLOW,"You are not driving any car");
        {
            
RepairVehicle(GetPlayerVehicleID);
        }
        else
        {
            
SendClientMessage(playerid,COLOR_RED,"You are not allowed to use this command"
        
}
        return 
1;
    } 
Reply
#2

pawn Код:
if (strcmp("/fix", cmdtext, true, 4) == 0)
    {
        if(Player[playerid][pAdmin] >= 1)
        {
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_YELLOW,"You are not driving any car");
        RepairVehicle(GetPlayerVehicleID);
        }
        else
        {
        SendClientMessage(playerid,COLOR_RED,"You are not allowed to use this command");
        }
        return 1;
    }
Reply
#3

pawn Код:
if (strcmp("/fix", cmdtext, true, 10) == 0)
{
    if(Player[playerid][pAdmin] >= 1)
    {
        if(IsPlayerInAnyVehicle)
        {
            RepairVehicle(GetPlayerVehicleID);
        }
        else
        {
            SendClientMessage(playerid, COLOR_YELLOW,"You are not driving any car");
        }
}
    else
    {
         SendClientMessage(playerid,COLOR_RED,"You are not allowed to use this command");
    }
    return 1;
}
Code not tested
Reply
#4

syntax error in the expression, or invalid function call
syntax error in the expression, or invalid function call
Reply
#5

pawn Код:
if (strcmp("/fix", cmdtext, true, 10) == 0)
{
    if(Player[playerid][pAdmin] >= 1)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            RepairVehicle(GetPlayerVehicleID(playerid));
        }
        else
        {
            SendClientMessage(playerid, COLOR_YELLOW,"You are not driving any car");
        }
}
    else
    {
         SendClientMessage(playerid,COLOR_RED,"You are not allowed to use this command");
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)