17.10.2018, 08:10
Hello. I have a problem. If a player use /spawnbike, this command destroy bike from another player.
Ex:
Me: /spawnbike - Spawning a bike
My friend:/spawnbike - My bike has been destroyed, -Spawning a bike.
How i can repair this command to spawn my bike and don't destroy another bike i i use again, destroy only my bike.
P.S : Sorry for bad english
Ex:
Me: /spawnbike - Spawning a bike
My friend:/spawnbike - My bike has been destroyed, -Spawning a bike.
How i can repair this command to spawn my bike and don't destroy another bike i i use again, destroy only my bike.
Quote:
new vbike[MAX_PLAYERS]; |
Quote:
CMD: spawnbike(playerid, params[]) { if(IsPlayerInRangeOfPoint(playerid, 2, 1670.1096, -1697.3649, 15.1642)) { if(vbike[playerid] == 0) { vbike[playerid] = AddStaticVehicleEx(509, 1670.1096, -1697.3649, 15.1642, -93.3600, 1, 1, 10, -1); PutPlayerInVehicle(playerid, vbike[playerid], -1); SendClientMessage(playerid, COLOR_WHITE, "Ai spawnat un bike!"); vbike[playerid] = 1; } else { DestroyVehicle(vbike[playerid]); vbike[playerid] = 0; SendClientMessage(playerid, COLOR_WHITE, "Aveai deja un vehicul {00ff00}spawnat{ffffff}."); SendClientMessage(playerid, COLOR_WHITE, "Din fericire a fost {00ff00}despawnat{ffffff}."); SendClientMessage(playerid, COLOR_WHITE, "Foloseste {00ff00}/spawnbike {ffffff}din nou pentru a spawna alt {00ff00}BIKE{ffffff}."); } } return 1; } |