06.08.2013, 22:46
what am i doing wrong i posted on here and some one told me to do this and i got errors how can i fix this or is completely wrong??
can some one fix this?
edit:
Код:
new PlayerWeapon[MAX_PLAYERS][12]; new PlayerWeaponAmmo[MAX_PLAYERS][12]; public OnPlayerStateChange(playerid, newstate, oldstate) { new vehicleid =GetPlayerVehicleID(playerid); new pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof pname); if (newstate == PLAYER_STATE_DRIVER) { for( new i; i != sizeof vcar; i++ ) { if (vehicleid == vcar[i]) { if(strcmp(pname, vcar_names[i], true) == 0) { SendClientMessage(playerid, COLOR_RED, "WELCOME VIP"); } else { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "THIS VEHICLE DOES NOT BELONG TO YOU"); } } } } return 1; } if (newstate==PLAYER_STATE_DRIVER){ // line 1476 for(new i=0;i<12;i++){ GetPlayerWeaponData(playerid, i, PlayerWeapon[playerid][i], PlayerWeaponAmmo[playerid][i]); } ResetPlayerWeapons(playerid); } if (newstate==PLAYER_STATE_ONFOOT && oldstate==PLAYER_STATE_DRIVER){ for(new i=0;i<12;i++){ GivePlayerWeapon(playerid, PlayerWeapon[playerid][i], PlayerWeaponAmmo[playerid][i]); } } return 1; }
edit:
Код:
:\Documents and Settings\Administrator\Desktop\SA SERVER\OFFICAL SERVER\gamemodes\xlgwolds.pwn(1476) : error 010: invalid function or declaration C:\Documents and Settings\Administrator\Desktop\SA SERVER\OFFICAL SERVER\gamemodes\xlgwolds.pwn(1477) : error 010: invalid function or declaration C:\Documents and Settings\Administrator\Desktop\SA SERVER\OFFICAL SERVER\gamemodes\xlgwolds.pwn(1482) : error 010: invalid function or declaration C:\Documents and Settings\Administrator\Desktop\SA SERVER\OFFICAL SERVER\gamemodes\xlgwolds.pwn(1483) : error 010: invalid function or declaration C:\Documents and Settings\Administrator\Desktop\SA SERVER\OFFICAL SERVER\gamemodes\xlgwolds.pwn(1487) : error 010: invalid function or declaration C:\Documents and Settings\Administrator\Desktop\SA SERVER\OFFICAL SERVER\gamemodes\xlgwolds.pwn(3159) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg") C:\Documents and Settings\Administrator\Desktop\SA SERVER\OFFICAL SERVER\gamemodes\xlgwolds.pwn(3542) : warning 203: symbol is never used: "PlayerWeapon" C:\Documents and Settings\Administrator\Desktop\SA SERVER\OFFICAL SERVER\gamemodes\xlgwolds.pwn(3542) : warning 203: symbol is never used: "PlayerWeaponAmmo" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase