SA-MP Forums Archive
help me cmd teles - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help me cmd teles (/showthread.php?tid=588780)



help me cmd teles - s3ek - 12.09.2015

PHP код:
CMD:sfa(playerid,params[])
{
    new 
string[256];
    new 
kuldoneve[MAX_PLAYER_NAME];
    
SetPlayerPos(playerid,-1657.6793, -165.295914.1484);
    
GameTextForPlayer(playerid,"~w~San Fierro Airport!",5000,4);
    
GetPlayerName(playeridkuldonevesizeof(kuldoneve));
    
format(stringsizeof(string), "%s Has Just Teleported To San Sierro Airport"kuldoneveplayerid);
        return 
SendClientMessageToAll(cdgreenstring);

why Destroy Vehicle when teleport and i don't put Destroy Vehicle ?


Re: help me cmd teles - s3ek - 12.09.2015

help


Re: help me cmd teles - Michael B - 12.09.2015

[QUOTE=s3ek;3575039]
PHP код:
if(!strcmp(cmdtext,"/sfa",true))
{
    new 
string[256];
    new 
kuldoneve[MAX_PLAYER_NAME];
if(
IsPlayerInAnyVehicle(playerid))
    {
    if(
GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        
SetVehiclePos(GetPlayerVehicleID(playerid), 1657.6793, -165.295914.1484);
    }
    else
    {
        
SendClientMessage(playerid, -1" You need to be the vehicle driver!");
    }
else
    {
    
SetPlayerPos(playerid,-1657.6793, -165.295914.1484);
    
GameTextForPlayer(playerid,"~w~San Fierro Airport!",5000,4);
    
GetPlayerName(playeridkuldonevesizeof(kuldoneve));
    
format(stringsizeof(string), "%s has just teleported to San Sierro Airport."kuldoneveplayerid);      
    
SendClientMessageToAll(cdgreenstring);
    }
return 
1;




Re: help me cmd teles - s3ek - 12.09.2015

i want cmdfa not if(!strcmp(cmdtext,"/sfa",true)) ?


Re: help me cmd teles - xTURBOx - 12.09.2015

Quote:
Originally Posted by s3ek
Посмотреть сообщение
i want cmdfa not if(!strcmp(cmdtext,"/sfa",true)) ?
PHP код:
cmd:sfa(playerid,params[])
{
    new 
string[256];
    new 
kuldoneve[MAX_PLAYER_NAME];
if(
IsPlayerInAnyVehicle(playerid))
    {
    if(
GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        
SetVehiclePos(GetPlayerVehicleID(playerid), 1657.6793, -165.295914.1484);
    }
    else
    {
        
SendClientMessage(playerid, -1" You need to be the vehicle driver!");
    }
else
    {
    
SetPlayerPos(playerid,-1657.6793, -165.295914.1484);
    
GameTextForPlayer(playerid,"~w~San Fierro Airport!",5000,4);
    
GetPlayerName(playeridkuldonevesizeof(kuldoneve));
    
format(stringsizeof(string), "%s has just teleported to San Sierro Airport."kuldoneveplayerid);      
    
SendClientMessageToAll(cdgreenstring);
    }
return 
1;