Вот полностью рабочая команда...
В игре пишешь /tpcor X.X Y.Y Z.Z
Enjoy...
Code
if(strcmp(cmd, "/tpcor", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] < 4)
{
SendClientMessage(playerid, COLOR_WHITE, "Ты не администратор");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Используй: /tpcor [x] [y] [z]");
return 1;
}
new coorx;
coorx = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Используй: /tpcor [x] [y] [z]");
return 1;
}
new coory;
coory = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Используй: /tpcor [x] [y] [z]");
return 1;
}
new coorz;
coorz = strval(tmp);
SetPlayerPos(playerid, coorx,coory,coorz);
format(string, sizeof(string), "Ты прилетел на координаты %d %d %d", coorx,coory,coorz);
SendClientMessage(playerid, COLOR_WHITE, string);
}
return 1;
}