28.12.2011, 11:46
Listen, i'm oldskool, so i'm still using dcmd but heres an example
edit: coded this in 30 seconds, so i'm not sure if it works.. compiled without errors though..
Make sure you have dcmd & sscanf.. or else edit it to whatever you want
Heres a line for dcmd, you put it at your defines
pawn Код:
dcmd_teleport(playerid,params[])
{
new id;
if (sscanf(params,"u",id)) return SendClientMessage(playerid, COLOR_RED, "[System] Usage: /teleport [ID]");
if(GetPlayerSkin(playerid) != 285) return 0;
SetPlayerPos(id,-88.0029, 1222.8109, 19.7422);
return 1;
}
Make sure you have dcmd & sscanf.. or else edit it to whatever you want
Heres a line for dcmd, you put it at your defines
pawn Код:
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1