18.09.2011, 19:58
pawn Код:
#include a_samp
#undef MAX_PLAYERS
#define MAX_PLAYERS 50
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);
PutPlayerInVehicle(playerid,carro,0);
return 1;
}
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);
PutPlayerInVehicle(playerid,carro,0);
return 1;
}
}
}
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
{
DestroyVehicle(carro);
SendClientMessage(playerid,-1,"vocк tinha um carro e ele foi destruido, crie outro.");
}
return 1;
}
return 0;
}
ta na mao
![Clucker](images/smilies/clucker2.png)