[HELP] With a Teleport Command
#1

I want to make a /sendtosf [playerid] command then i teleport players to Wangs ZCMD
Reply
#2

PHP код:
CMD:sendtosf(playeridparams[])
{
    new 
givedplayerid,playersname[MAX_PLAYER_NAME],str[60], interiormoneys1;
    if (!
IsPlayerAdmin(playerid)) return 0;//If Player is not rcon admin then show unkown command..
    
if (sscanf(params"u"givedplayerid)) return SendClientMessage(playeridCOLOR_WHITE"Usage: /sendtosf [playerid]");
    if (!
IsPlayerConnected(givedplayerid))    return SendClientMessage(playeridCOLOR_RED"Error: Inactive player id!");
    
GetPlayerName(givedplayeridplayersnamesizeof(playersname));
    
SetPlayerInterior(givedplayerid,0);
    
SetPlayerVirtualWorld(givedplayerid,0);
    if (
GetPlayerState(givedplayerid) == PLAYER_STATE_DRIVER && interior == 0)
    {
        
moneys1 GetPlayerVehicleID(givedplayerid);
        
SetVehiclePos(moneys1, -2075.9360,-77.8931,35.3203);
    }
    else
    {
           
SetPlayerPos(givedplayeridFloat:xFloat:xFloatz);//Set the wange cars coords at x, y ,z
    
}
    
GameTextForPlayer(givedplayerid"Teleported to SF"20000);
    
format(str,sizeof(str),"You have teleported %s to SF.",playersname);
    
SendClientMessage(playerid,-1,str);
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)