teleport commands for players names?
#4

There are more efficient ways, you could add it into an enumeration, for example:

pawn Код:
#include <zcmd> // just do it, d_cmd is slow as s**t
    enum pInfo
    {
        //whatever your enums are
        UnrestrictedStunt
    }
    new PlayerInfo[MAX_PLAYERS][pInfo]

CMD:stunt(playerid, params[])
{
    if(PlayerInfo[playerid][UnrestrictedStunt] == 1) // if he is allowed to go there
    {
        new name[24], string[128];
        if(IsPlayerInAnyVehicle(playerid) %% GetPlayerState(playerid) == 2)
        {
            new vehid = GetPlayerVehicleID(playerid);
            SetVehiclePos(vehid, 3362.1589355469, -2069.42578125, 46.729736328125);
            PutPlayerInVehicle(playerid, vehid, 0);
           
            GetPlayerName(playerid, name, sizeof(name));
            format(string, sizeof(string), "{00FFEE}%s (%d){C9FFAB} ..::has gone to do some stunt::..{6600FF}(/STUNT)", name, playerid);
            SendClientMessageToAll(-1, string);
           
        }
        else return SendClientMessage(playerid, -1, "You are not authorized to use this!");
    }
    return 1;
}
Also, "SendClientMessageForAll" would not return playerid's as it send it to all, so just use (color, "nabba")

Also when you use "Format" and you've defined a size before it, instead of defining the limit on the format, just use sizeof(string).

Hope I helped

Use ZCMD, just look it up and you'll find it.
Hope it helped.
Reply


Messages In This Thread
teleport commands for players names? - by kaos999 - 15.08.2013, 00:20
Re : teleport commands for players names? - by Naruto_Emilio - 15.08.2013, 01:15
Re: Re : teleport commands for players names? - by kaos999 - 15.08.2013, 01:24
Re: teleport commands for players names? - by Lyksus - 15.08.2013, 01:56
Re: Re : teleport commands for players names? - by Lyksus - 15.08.2013, 02:00
Re: teleport commands for players names? - by Legend_Of_War - 15.08.2013, 02:05
Re: teleport commands for players names? - by Naruto_Emilio - 15.08.2013, 02:10
Re: teleport commands for players names? - by Lyksus - 15.08.2013, 02:50

Forum Jump:


Users browsing this thread: 3 Guest(s)