06.04.2011, 16:03
pawn Код:
if(strcmp(cmdtext, "/ir", true,3) == 0) {
new
Float:x,Float:y,Float:z,
escolher[256];
escolher = KcmD(1, cmdtext);
if(!strlen(escolher))
return SendClientMessage(playerid,COLOR_GREEN,"Use: /ir [id]");
GetPlayerPos(strval(escolher),x,y,z);
return SetPlayerPos(playerid,x,y+2,z);
}
pawn Код:
stock KcmD(param, cmdtext[])
{
new string[128], pos, var;
format(string, sizeof(string), "%s ", cmdtext);
while((pos = strfind(string, " ", true)) != -1)
{
if(var == param) return string;
var++;
strdel(string, 0, pos + 1);
if(strcmp(string, " ", true, pos) == 0) goto end;
}
end:
string[0] = '\0';
return string;
}

