Yeah, you can .... Watch :
You put this under
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
return 0;
}
pawn Код:
if(strcmp(cmdtext, "/hydra", true) == 0)
{
new pName[MAX_PLAYER_NAME];
new string [128];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "*** %s (ID: %d) went to /hydra ", pName, playerid);
SendClientMessageToAll(grey, string);
if(GetPlayerState(playerid) == 2)
{
SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 0.0);
LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
}
else
{
SetPlayerPos(playerid, x, y, z);
}
GameTextForPlayer(playerid, "~w~Hydra something ~B~ Have fun!", 4000, 6);
SetPlayerInterior(playerid, 0);
return 1;
}
If you want it NOT to teleport with vehicle delete the
pawn Код:
if(GetPlayerState(playerid) == 2)
{
SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 0.0);
LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
}
EDIT: Instead of x,y,z you put the coordinates where you want to teleport the player ...
TO DO that you gotta go in-game, go to that place, use /save and go to
Код:
C:\Users\Blue\Documents\GTA San Andreas User Files\SAMP
And open savedposition ...
You will find something like :
pawn Код:
--------------------x ---------y----------z------------------------------
AddPlayerClass(155,-1997.2323,567.0696,35.0156,74.2961,0,0,0,0,0,0);
You just take the x, y and z coordinates