08.06.2015, 05:59
I have tried to make /go command that teleports player to other player with /gos command that enables/disables players from teleporting to you!
Whats wrong in this?
Please help!
Thanks!!!
Errors:
Whats wrong in this?
Please help!
Thanks!!!
Код:
CMD:go(playerid, params[])
{
new giveplayerid;
if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE:/go(playerid) to teleport to that player");
new Float:x;
new Float:y;
new Float:z;
(825) if(goto[playerid][giveplayerid] == true
{
GetPlayerPos(giveplayerid, x,y,z);
SetPlayerPos(playerid, x,y,z);
}
else if(goto[playerid][all] == false
{
SendClientMessage(playerid, 0xFF0000FF, "That player disabled teleports to him!");
}
return 1;
}
CMD:gos(playerid, params[])
{
new giveplayerid;
if(sscanf(params, "i", giveplayerid)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE:/gos to enable/disable players for teleporting to you!");
if(goto[playerid][giveplayerid] == true
{
SendClientMessage(playerid, 0xFF0000FF, "You have disabled player from teleporting to you!");
goto[playerid][giveplayerid] = false;
}
if(goto[playerid][giveplayerid] == false
{
SendClientMessage(playerid, 0xFF0000FF, "You have enabled player from teleporting to you!");
goto[playerid][giveplayerid] = true;
}
return 1;
}
Код:
C:\Users\----\Desktop\Sa-Mp Server\gamemodes\Commands.pwn(825) : error 029: invalid expression, assumed zero C:\Users\----\Desktop\Sa-Mp Server\gamemodes\Commands.pwn(825) : error 029: invalid expression, assumed zero C:\Users\----\Desktop\Sa-Mp Server\gamemodes\Commands.pwn(825) : warning 215: expression has no effect C:\Users\----\Desktop\Sa-Mp Server\gamemodes\Commands.pwn(825) : error 001: expected token: ";", but found "]" C:\Users\----\Desktop\Sa-Mp Server\gamemodes\Commands.pwn(825) : fatal error 107: too many error messages on one line


