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.2959, 14.1484);
GameTextForPlayer(playerid,"~w~San Fierro Airport!",5000,4);
GetPlayerName(playerid, kuldoneve, sizeof(kuldoneve));
format(string, sizeof(string), "%s Has Just Teleported To San Sierro Airport", kuldoneve, playerid);
return SendClientMessageToAll(cdgreen, string);
}
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.2959, 14.1484);
}
else
{
SendClientMessage(playerid, -1, " You need to be the vehicle driver!");
}
else
{
SetPlayerPos(playerid,-1657.6793, -165.2959, 14.1484);
GameTextForPlayer(playerid,"~w~San Fierro Airport!",5000,4);
GetPlayerName(playerid, kuldoneve, sizeof(kuldoneve));
format(string, sizeof(string), "%s has just teleported to San Sierro Airport.", kuldoneve, playerid);
SendClientMessageToAll(cdgreen, string);
}
return 1;
}
Re: help me cmd teles -
s3ek - 12.09.2015
i want cmd

fa not if(!strcmp(cmdtext,"/sfa",true)) ?
Re: help me cmd teles -
xTURBOx - 12.09.2015
Quote:
Originally Posted by s3ek
i want cmd  fa 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.2959, 14.1484);
}
else
{
SendClientMessage(playerid, -1, " You need to be the vehicle driver!");
}
else
{
SetPlayerPos(playerid,-1657.6793, -165.2959, 14.1484);
GameTextForPlayer(playerid,"~w~San Fierro Airport!",5000,4);
GetPlayerName(playerid, kuldoneve, sizeof(kuldoneve));
format(string, sizeof(string), "%s has just teleported to San Sierro Airport.", kuldoneve, playerid);
SendClientMessageToAll(cdgreen, string);
}
return 1;
}