11.08.2013, 17:40
Well, firstly you need to define the actual team, which you can do if you're actually the scripter there, then all you do is:
pawn Код:
if(strcmp(cmd, "/policespawn", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 5,1573.9717,-1696.8590,6.2188))
{
if(playerInfo[playerid][pTeam] == 1) // assign the value to your desired team
{
ShowPlayerDialog(playerid, 8437, DIALOG_STYLE_LIST, "LSPD Vehicles", "LVPD\nLSPD\nSFPD\nMaverick\nRanger\nFBI", "Choose", "Exit");
}
else return SendClientMessage(playerid, -1, "You are not in the LSPD!");
}
}
// put this somewhere in OnDialogResponse
if(dialogid == 8437)
{
if(!reponse) return SendClientMessage(playerid, -1, "You cancelled selection."); // if he pressed escape/exit
if(response) // if he clicked get car
{
// in here you add the code for spawning the vehicle, make sure it's about 5 away from them so they dont get stuck!
}
}