- 0
Cum pun asta in GM?
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
andrei04072
[pawn]#include <a_samp>
#define DIALOG_PLATE 100
new vehicleid, Float:XX,Float:YY,Float:ZZ;
public OnPlayerCommandText(playerid,cmdtext[])
{
if(strcmp(cmdtext,"/plate",true) == 0)
{
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
if(IsPlayerInRangeOfPoint(playerid, 7.0, 1288.1112, -983.8457, 32.6020))
{
ShowPlayerDialog(playerid, DIALOG_PLATE, DIALOG_STYLE_INPUT, "Numar de imatriculare", "Introduceti numarul dorit:", "Schimbati", "Iesiti");
GivePlayerMoney(playerid,-1000);
}
else
{
SendClientMessage(playerid,-1,"ERROR: Nu esti in garaj(garajul este unde sunt si neoanele)!");
}
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_PLATE)
{
if(response)
{
vehicleid = GetPlayerVehicleID(playerid);
SetVehicleNumberPlate(vehicleid,inputtext);
GetVehiclePos(vehicleid,XX,YY,ZZ);
SetVehicleToRespawn(vehicleid);
SetVehiclePos(vehicleid,XX,YY,ZZ);
PutPlayerInVehicle(playerid,vehicleid,0);
}
return 1;
}
return 0;
}[/pawn]
1 answer to this question
Recommended Posts