Topo Do GM
new sendername[MAX_PLAYER_NAME];
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/pawnsamp", true) == 0)public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
ShowPlayerDialog(playerid, IDdoDialog,DIALOG_STYLE_LIST,"Teleportes","\n- Ps - \n- Ps2 -","Ok","Sair");
return 1;
}
{
if(dialogid == IDdoDialog)
{
if(response)
{
if(listitem == 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetVehiclePos(GetPlayerVehicleID(playerid), CORDENADAS DO TELEPORTE);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 266.6323);
LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
}
else
{
SetPlayerPos(playerid, CORDENADAS);
}
TogglePlayerControllable(playerid, 1);
SetPlayerInterior(playerid, 0);
ResetPlayerWeapons(playerid);
GetPlayerName(playerid, sendername, sizeof(sendername));
new string[256];
format(string, sizeof(string), "%s Foi para ps ! (/pawnsamp)", sendername);
SendClientMessageToAll(COR, string);
}
}
if(listitem == 1)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetVehiclePos(GetPlayerVehicleID(playerid), CORDENADAS DO TELEPORTE);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 266.6323);
LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
}
else
{
SetPlayerPos(playerid, CORDENADAS DO TELEPORTE);
}
TogglePlayerControllable(playerid, 1);
SetPlayerInterior(playerid, 0);
ResetPlayerWeapons(playerid);
GetPlayerName(playerid, sendername, sizeof(sendername));
new string[256];
format(string, sizeof(string), "%s Foi para ps2 ! (/pawnsamp)", sendername);
SendClientMessageToAll(COR, string);
}
}