SA-MP Forums Archive
Command Help - 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: Command Help (/showthread.php?tid=496689)



Command Help - gilad95 - 23.02.2014

Hello I built my server activity then I built her a launching area of activity and I want to do I'm in that area I will be able to send my car to the area but it seems I can not send the vehicle to the area this is how I do it will be possible to send the car to this area? This command

Код:
if (strcmp("/GoToDrisa", cmdtext, true, 10) == 0) 
{ 
if(!IsPlayerXAdmin(playerid))return SendClientMessage(playerid,0xFF0000FF,"фчегд жаъ жойрд шч магойрйн"); 
if( GetPlayerState(playerid) == PLAYER_STATE_DRIVER ) 
{ 
SetVehiclePos(GetPlayerVehicleID(playerid), 2381.4929,1132.9126,34.2529 ); 
SetVehicleZAngle(GetPlayerVehicleID(playerid), 268.4467 ); 
SetPlayerTime(playerid,00,00); 
LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0 ); 
}else{ 
SetPlayerPos(playerid, 2381.4929,1132.9126,34.2529); 
SetPlayerFacingAngle(playerid, 268.4467); 
SetPlayerTime(playerid,10,00); 
ResetPlayerWeapons(playerid); 
} 
SetPlayerVirtualWorld(playerid, 62); 
SetPlayerInterior(playerid,0); 
SendClientMessage(playerid, 0x00FF00FF, "! дщъвшъ мажеш дфтймеъ гшйсд"); 
return 1; 
}



Re: Command Help - Ryan_Undering - 23.02.2014

You're using Pawn coding... why are you using a [php] tag? Use a [pawn] tag... It'll be much easier to read :l


Re: Command Help - gilad95 - 23.02.2014

Quote:
Originally Posted by Ryan_Undering
Посмотреть сообщение
You're using Pawn coding... why are you using a [php] tag? Use a [pawn] tag... It'll be much easier to read :l
i edit its ok?


Re: Command Help - ahmedkoki - 23.02.2014

Try this

pawn Код:
if (strcmp("/GoToDrisa", cmdtext, true, 10) == 0)
{
if(!IsPlayerXAdmin(playerid))return SendClientMessage(playerid,0xFF0000FF,"фчегд жаъ жойрд шч магойрйн");
if( GetPlayerState(playerid) ==  2 )
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 2381.4929,1132.9126,34.2529);
LinkVehicleToInterior(tmpcar, 0);
SetVehicleVirtualWorld(tmpcar, 0);

}else{
SetPlayerPos(playerid, 2381.4929,1132.9126,34.2529);
SetPlayerFacingAngle(playerid, 268.4467);
SetPlayerTime(playerid,10,00);
ResetPlayerWeapons(playerid);
}
SetPlayerVirtualWorld(playerid, 62);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid, 0x00FF00FF, "! дщъвшъ мажеш дфтймеъ гшйсд");
return 1;
}



Re: Command Help - gilad95 - 23.02.2014

Quote:
Originally Posted by ahmedkoki
Посмотреть сообщение
Try this

pawn Код:
if (strcmp("/GoToDrisa", cmdtext, true, 10) == 0)
{
if(!IsPlayerXAdmin(playerid))return SendClientMessage(playerid,0xFF0000FF,"фчегд жаъ жойрд шч магойрйн");
if( GetPlayerState(playerid) ==  2 )
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 2381.4929,1132.9126,34.2529);
LinkVehicleToInterior(tmpcar, 0);
SetVehicleVirtualWorld(tmpcar, 0);

}else{
SetPlayerPos(playerid, 2381.4929,1132.9126,34.2529);
SetPlayerFacingAngle(playerid, 268.4467);
SetPlayerTime(playerid,10,00);
ResetPlayerWeapons(playerid);
}
SetPlayerVirtualWorld(playerid, 62);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid, 0x00FF00FF, "! дщъвшъ мажеш дфтймеъ гшйсд");
return 1;
}
not work i do this and can i go with car but i want to do i callcar in this area and can be spawnc(xap)to this area how i do this?

PHP код:
if (strcmp("/GoToDrisa"cmdtexttrue10) == 0)
{
if(!
IsPlayerXAdmin(playerid))return SendClientMessage(playerid,0xFF0000FF,"фчегд жаъ жойрд шч магойрйн");
if( 
GetPlayerState(playerid) ==  )
{
new 
tmpcar GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar2381.4929,1132.9126,34.2529);
LinkVehicleToInterior(tmpcar0);
SetVehicleVirtualWorld(tmpcar62);
}else{
SetPlayerPos(playerid2381.4929,1132.9126,34.2529);
SetPlayerFacingAngle(playerid268.4467);
SetPlayerTime(playerid,10,00);
ResetPlayerWeapons(playerid);
}
SetPlayerVirtualWorld(playerid62);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid0x00FF00FF"! дщъвшъ мажеш дфтймеъ гшйсд");
return 
1;




Re: Command Help - gilad95 - 23.02.2014

help someone?


Re: Command Help - gilad95 - 24.02.2014

plz help me