Need some help
#2

You can use sscanf and you won't have problems like this.

Edit: I made it quickly and in text document(I'm in school) so I'm not sure if this is gonna work.
WITH SSCANF!
pawn Код:
dcmd_goto(playerid,params[])
{
    new playerid2, string[128];
    if(!sscanf(params, "u", playerid2))
    {
        if(IsPlayerConnected(playerid2))
        {
            new Float:x,Float:y,Float:z;
            GetPlayerPos(playerid2, x, y, z);
            SetPlayerPos(playerid, x+2, y, z);
            format(string,sizeof(string),"You have teleported to %s's location!",GetName(playerid2));
            SendClientMessage(playerid,blue,string);
            format(string,sizeof(string),"Player %s has teleported to you!",GetName(playerid));
            SendClientMessage(playerid,blue,string);
        }
        else return SendClientMessage(playerid,red,"ERROR: Player is not connected!");
    }
    else return SendClientMessage(playerid,red,"USAGE: /goto [ID]");
    return 1;
}
Reply


Messages In This Thread
Need some help - by Libra_PL - 15.02.2011, 09:53
Re: Need some help - by xRyder - 15.02.2011, 09:57
Re: Need some help - by Libra_PL - 15.02.2011, 12:44
Re: Need some help - by xRyder - 15.02.2011, 14:07
Re: Need some help - by Libra_PL - 15.02.2011, 14:11
Re: Need some help - by xRyder - 15.02.2011, 14:22
Re: Need some help - by Libra_PL - 15.02.2011, 14:30
Re: Need some help - by xRyder - 15.02.2011, 14:32
Re: Need some help - by AlExAlExAlEx - 15.02.2011, 14:35
Re: Need some help - by xRyder - 15.02.2011, 14:38

Forum Jump:


Users browsing this thread: 3 Guest(s)