17.04.2009, 15:18
for a start you are missing code is should go something like erm ... yea here you go this will work
Quote:
enum pInfo { pSeatBelt, }; new PlayerInfo[MAX_PLAYERS][pInfo]; public OnPlayerDeath(playerid, killerid, reason) { PlayerInfo[playerid][pSeatBelt] = 0; { public OnPlayerExitVehicle(playerid, vehicleid) { if (GetPlayerState(playerid) == 1) { return 1; } if(gGas[playerid] == 0) { GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~ Left car", 500, 3); } if(PlayerInfo[playerid][pSeatBelt] == 1) { PlayerInfo[playerid][pSeatBelt] = 0; new stringtosee[255]; new sendername[MAX_PLAYER_NAME]; GetPlayerName(playerid, sendername, sizeof(sendername)); new ftext[255]; if(PlayerInfo[playerid][pSex] == 1) { ftext = "his"; } else if(PlayerInfo[playerid][pSex] == 1) { ftext = "her"; } format(stringtosee, sizeof(stringtosee), "* %s unbuckles %s seat belt", sendername , ftext); ProxDetector(30.0, playerid, stringtosee, 0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2 DAAA); return 1; } return 1; } if(strcmp(cmd,"/belt",true)==0) { if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { SendClientMessage(playerid,COLOR_GREY,"You are not in any vehicle"); return 1; } if(PlayerInfo[playerid][pSeatBelt] == 1) { PlayerInfo[playerid][pSeatBelt] = 0; GetPlayerName(playerid, sendername, sizeof(sendername)); new stringtosee[255]; new ftext[255]; if(PlayerInfo[playerid][pSex] == 1) { ftext = "his"; } else if(PlayerInfo[playerid][pSex] == 1) { ftext = "her"; } format(stringtosee, sizeof(stringtosee), "* %s unbuckles %s seat belt", sendername , ftext); ProxDetector(30.0, playerid, stringtosee, 0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2 DAAA); return 1; } PlayerInfo[playerid][pSeatBelt] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); new stringtosee[255]; new ftext[255]; if(PlayerInfo[playerid][pSex] == 1) { ftext = "his"; } else if(PlayerInfo[playerid][pSex] == 1) { ftext = "her"; } format(stringtosee, sizeof(stringtosee), "* %s buckles %s seat belt", sendername , ftext); ProxDetector(30.0, playerid, stringtosee, 0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2 DAAA); return 1; } |