Need help on /(carname) - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need help on /(carname) (
/showthread.php?tid=268434)
Need help on /(carname) -
hokarheng - 12.07.2011
Guys , i need help on my server
www.teamemp.blogspot.com
I need /elegy command how do i do it ?
Eg :
/elegy
Then it will automatically go in the car
Re: Need help on /(carname) -
Shadoww5 - 12.07.2011
Removed.
Re: Need help on /(carname) -
[MG]Dimi - 12.07.2011
PHP код:
if(strcmp("/elegy",cmdtext,true) == 0)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);
CreateVehicle(562, x, y, z, 0, -1, -1, 60);
PutPlayerInVehicle(playerid,vehicleid,0);
return 1;
}
With this command youll spawn elegy on your position and get teleported in it automatically.
Re: Need help on /(carname) -
hokarheng - 13.07.2011
erm where do i put
if(strcmp("/elegy",cmdtext,true) == 0)
{
new Float
, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);
CreateVehicle(562, x, y, z, 0, -1, -1, 60);
PutPlayerInVehicle(playerid,vehicleid,0);
return 1;
}
Re: Need help on /(carname) -
Skaizo - 13.07.2011
Quote:
Originally Posted by hokarheng
erm where do i put
if(strcmp("/elegy",cmdtext,true) == 0)
{
new Float , Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);
CreateVehicle(562, x, y, z, 0, -1, -1, 60);
PutPlayerInVehicle(playerid,vehicleid,0);
return 1;
}
|
put in public OnPlayerCommandText(playerid, cmdtext[])
exemple
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/elegy",cmdtext,true) == 0)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);
CreateVehicle(562, x, y, z, 0, -1, -1, 60);
PutPlayerInVehicle(playerid,vehicleid,0);
return 1;
}
}