09.12.2013, 22:02
Pequena base:
pawn Код:
new bool: OrgTemp[MAX_PLAYERS];
CMD:entrarorg(playerid, params[]) {
if ( PlayerInfo[playerid][pSocio] == 0 )
return false;
if ( isnull(params) )
return SendClientMessage(playerid, -1, "/entrarorg [id]");
new id_ = strval(params);
if ( id_ > MAX_ORGS || id_ < 1 )
return SendClientMessage(playerid, -1, "Id invбlido!");
PlayerInfo[playerid][pMember] = id_;
OrgTemp[playerid] = true;
return 1;
}
public OnPlayerDeath(playerid, killerid, reason) {
if ( OrgTemp[playerid] == true) {
OrgTemp[playerid] = false;
PlayerInfo[playerid][pMember] = 0;
}
return 1;
}
public OnPlayerDisconnect(playerid, reason) {
if ( OrgTemp[playerid] == true) {
OrgTemp[playerid] = false;
PlayerInfo[playerid][pMember] = 0;
}
return 1;
}