25.02.2010, 02:29
Galera, estou tentando fazer um comando pros admins irem pra uma coordenada especifica ... o problema eh que nao sei muito bem como fazer esses comandos que sao definidos 1, 2 ou 3 valores .... ta atй meio que funcionando, acontece q ta indo pra coordenadas erradas, sу o Y ta funcionando mais ou menos ..
vejam
vejam
Код:
if(strcmp(cmd, "/ircoord", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
new Float:x;
x = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USE: /ircoord x y z!");
return 1;
}
new Float:y;
y = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USE: /ircoord x y z!");
return 1;
}
new Float:z;
z = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USE: /ircoord x y z!");
return 1;
}
SetPlayerPos(playerid, x,y,z);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado a usar esse comando !");
}
}
return 1;
}

