19.12.2009, 10:53
I want to show you frauds in wiki.sa-mp.com.
1. AddStaticVehicle works not only in OnGameModeInit.
Vehicle shows up and works good.
2. AddStaticVehicle returns ID of created vehicle.
After few uses of this command, console shows:
3. Removing vehicles created with AddStaticVehicle:
Worked good.
1. AddStaticVehicle works not only in OnGameModeInit.
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/hydra", true)) { new Float:X, Float:Y, Float:Z, Float:A; GetPlayerPos(playerid, X, Y, Z); GetPlayerFacingAngle(playerid, A); AddStaticVehicle(520, X, Y, Z, A, 0, 0); return 1; } return 0; }
2. AddStaticVehicle returns ID of created vehicle.
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/hydra", true)) { new Float:X, Float:Y, Float:Z, Float:A; GetPlayerPos(playerid, X, Y, Z); GetPlayerFacingAngle(playerid, A); printf("%d", AddStaticVehicle(520, X, Y, Z, A, 0, 0)); return 1; } return 0; }
Quote:
[12:41:56] 1 [12:42:04] 2 [12:42:08] 3 [12:42:16] 4 |
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/hydra", true)) { new Float:X, Float:Y, Float:Z, Float:A; GetPlayerPos(playerid, X, Y, Z); GetPlayerFacingAngle(playerid, A); printf("%d", AddStaticVehicle(520, X, Y, Z, A, 0, 0)); return 1; } if(!strcmp(cmdtext, "/d", true, 2)) { printf("%d", strval(cmdtext[3])); DestroyVehicle(strval(cmdtext[3])); return 1; } return 0; }