/goto problem.
#1

Hello again!

I am creating my own admin filterscript with MySQL sscanf and zcmd.

My problem:
Check out this code:
PHP код:
CMD:goto(playerid,params[]){
    new 
id,str[256],name[MAX_PLAYER_NAME];
    if(
sscanf(params,"i",id))return SendClientMessage(playerid,-1,"{FF9900}Usage:{FFFFFF} /goto [Playerid]");
    if(!
IsConnect(id))return SendClientMessage(playerid,-1,"Player{FF0000} not{FFFFFF} found");
    if(
IsPlayerInDMgoto[playerid] != 0) return SendClientMessage(playerid, -1"{FFFFFF}You{FF0000} can't{FFFFFF} goto this player while on DM!");
    if(
P_DATA[id][Agoto] == false)return SendClientMessage(playerid,-1,"{FFFFFF}You{FF0000} can't{FFFFFF} goto to this player because he disabled it.");
    new 
Float:Pos[4];
    
GetPlayerPos(id,Pos[0],Pos[1],Pos[2]);
    
GetPlayerFacingAngle(id,Pos[3]);
    if(
IsPlayerInAnyVehicle(playerid)){
        
SetVehiclePos(GetPlayerVehicleID(playerid),Pos[0],Pos[1],Pos[2]);
    }
    else{
        
SetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
        
SetPlayerFacingAngle(playerid,Pos[3]);
    }
    
GetPlayerName(id,name,sizeof(name));
    
format(str,sizeof(str),"You have teleported to '{FFFF00}%s{FFFFFF}'.",name);
    
SendClientMessage(playerid,-1,str);
    return 
1;

When I type /goto 0 it shows me again this: Usage: /goto [Playerid]
Please can you help me fast? +1 Rep if someone helps.
Reply


Messages In This Thread
/goto problem. - by ChristolisTV - 31.07.2015, 18:55
Re: /goto problem. - by x3378 - 31.07.2015, 19:09
Re: /goto problem. - by ChristolisTV - 31.07.2015, 19:14
Re: /goto problem. - by SFA7X - 31.07.2015, 19:15
Re: /goto problem. - by ChristolisTV - 31.07.2015, 19:27
Re: /goto problem. - by Abagail - 31.07.2015, 19:32
Re: /goto problem. - by ChristolisTV - 31.07.2015, 19:38
Re: /goto problem. - by ChristolisTV - 31.07.2015, 19:57
AW: /goto problem. - by Macronix - 31.07.2015, 20:00
Re: AW: /goto problem. - by ChristolisTV - 31.07.2015, 20:03
Re: /goto problem. - by Variable™ - 31.07.2015, 20:05
Re: /goto problem. - by 025Tadija - 31.07.2015, 22:25

Forum Jump:


Users browsing this thread: 2 Guest(s)