28.11.2010, 11:17
of course it is,
here is mine with some explanation:
here is mine with some explanation:
pawn Код:
if(strcmp(cmdtext, "/stunt1", true)==0) //It is on a command, if you want to do it on a pickup, simply //change all thise strcmp and stuff to if(pickup...)
{
new vehicleid=GetPlayerVehicleID(playerid);
if(vehicleid){
SetVehiclePos(vehicleid, x,y,z);
GameTextForPlayer(playerid," you teleported in a vehicle",5000,3);
}
else
{
SetPlayerPos(playerid, x,y,z); //If the player is not in a vehicle and he teleports:
GameTextForPlayer(playerid,"You teleported onfoot",5000,3);
}
return 1;
}