22.04.2015, 14:56
https://www.youtube.com/watch?v=sVpHRDZQWUM
i'm simply using larp gamemode.
...
my code :
i'm simply using larp gamemode.
...
my code :
Код:
public OnPlayerConnect(playerid) { if( IsPlayerNPC( playerid ) ) return 1; } public OnPlayerSpawn(playerid) { if(IsPlayerNPC(playerid)) { gPlayerAccount[playerid] = 1; new nume[MAX_PLAYER_NAME]; GetPlayerName(playerid,nume,sizeof(nume)); if(!strcmp(nume,"[BOT]Tutorial1",false)) { TogglePlayerControllable(playerid, 0); SetPlayerVirtualWorld(playerid, 95); SetPlayerPos(playerid , 222.3193,115.0811,1010.2188); SetPlayerFacingAngle( playerid, 177.3717 ); SetPlayerSkin(playerid,98); SetPlayerAttachedObject(playerid, 3,1210,5,0.3,0.1,0.0,0.0,270.0,0.0); } if(!strcmp(nume,"[BOT]Tutorial2",false)) { TogglePlayerControllable(playerid, 0); SetPlayerVirtualWorld(playerid, 95); SetPlayerPos(playerid , 221.5607,111.9919,1010.2118); SetPlayerFacingAngle(playerid ,0.3366 ); SetPlayerSkin(playerid,281); SetPlayerAttachedObject(playerid, 1,19521,2,0.14,0,0,0,0,0,1,1.15,1.20); SetPlayerAttachedObject(playerid, 3,19142,1,0.05,0.04,0,0,0,0,1.10,1.10,1.10); } return 1; } } //------------------------------------------------------------------------------------------------------ public OnGameModeInit() { new string[MAX_PLAYER_NAME]; new string1[MAX_PLAYER_NAME]; for(new c=0;c<CAR_AMOUNT;c++) { Gas[c] = GasMax; } ConnectNPC("[BOT]Tutorial1", "npcidle"); ConnectNPC("[BOT]Tutorial2", "npcidle"); }