10.04.2016, 19:09
mбs simple asi
Код:
new TiempoEspera[MAX_PLAYERS]; if (!strcmp("/ccar nr", cmdtext, true)) { if((gettime() - TiempoEspera[playerid]) < 20) return SendClientMessage(playerid, -1, "Debes esperar 20 segundos"); new VehNrg, Float, Float:y, Float:z, Float:a; GetPlayerPos(playerid, x, y, z); GetPlayerVehicleID(playerid); GetPlayerFacingAngle(playerid, a); SpawnAuto[playerid] = CreateVehicle(522, x, y+2, z+1, a, -1, -1, -1); SetVehicleVirtualWorld(VehNrg, GetPlayerVirtualWorld(playerid)); GivePlayerMoney(playerid, -500); SendPlayerFormattedText(playerid," Has comprado un Vehiculo ($-500)", 0); TiempoEspera = gettime(); return 1; }