07.10.2010, 22:42
First of all: What the hell?!? Why did you make the indentation so hard to understand??
Here is the code in understandable format, look where I put the question marks and tell me what that's all about?
Here is the code in understandable format, look where I put the question marks and tell me what that's all about?
pawn Код:
CMD:goto(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 1) // Wrong way :)
{
return SendClientMessage(playerid, 0xFF4646FF, "You are not authorized to use that command !");
}
else
{
new pID,
otherId,
string[256];
if(!IsPlayerConnected(pID))
return SendClientMessage(playerid, COLOR_RED, "* Invalid player ID!");
{ // ???????
if(sscanf(params, "rii", otherId)) // Missing two parimeters (Two integers)
return SendClientMessage(playerid, 0xAFAFAFAA, "Usage: /goto [PlayerID/PartOfName]");
format(string, sizeof(string), "* You have successfully teleported your self",playerid);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
new Float:x, Float:y, Float:z;
GetPlayerPos(otherId, x, y, z);
SetPlayerPos(playerid, x+1, y, z);
} // ???????
}
return 1;
}