22.09.2011, 16:31
pawn Code:
#include a_samp
new
bool:temcarro[MAX_PLAYERS],
carro
;
public OnFilterScriptInit() return 1;
public OnFilterScriptExit() return 1;
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 9999)
{
if(response == 1)
{
if(listitem == 0)
{
new Float:c[4];
GetPlayerPos(playerid,c[0],c[1],c[2]);
carro = CreateVehicle(562,c[0],c[1],c[2],c[3],-1,-1,5000);
return PutPlayerInVehicle(playerid,carro,0);
}
if(listitem == 1)
{
new Float:c[4];
GetPlayerPos(playerid,c[0],c[1],c[2]);
carro = CreateVehicle(560,c[0],c[1],c[2],c[3],-1,-1,5000);
return PutPlayerInVehicle(playerid,carro,0);
}
}
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/carros", cmdtext, true, 10) == 0)
{
if(temcarro[playerid] == false) {
ShowPlayerDialog(playerid,9999,DIALOG_STYLE_LIST,"Carros","Elegy\nSultan","Ok","Fechar"); }
else return DestroyVehicle(carro),SendClientMessage(playerid,-1,"vocк tinha um carro e ele foi destruido, crie outro.");
return 1;
}
return 0;
}