13.06.2010, 18:18
You need to put the commands "/ja" and "/nein" under OnPlayerCommandText:
An example:
Then you can code the unrent function.
An example:
Код:
if(!strcmp(cmdtext,"/ja",true,3)) { new Vehicle; Vehicle = GetPlayerVehicleID(playerid); for (new i=0; i<sizeof(NoobVehicles); i++) { if (Vehicle == NoobVehicles[i]) { if(GetPlayerMoney<100) return SendClientMessage(playerid,0xffff00aa,"You do not have enough money."); GivePlayerMoney(playerid,-100); SendClientMessage(plaeyerid,0xff0000,"You have now rented this car for 10 minutes"); SetTimer("UnrentCar",600000 } } return 1; }