Код
if(strcmp(cmd, "/tpcor", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] < 5)
{
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), "Вы были телепортированны на указанные вами кординаты", coorx,coory,coorz);
SendClientMessage(playerid, COLOR_WHITE, string);
}
return 1;
}