06.11.2011, 14:28
pawn Код:
COMMAND:hangup(playerid, params[])
{
new string[128],sendername[MAX_PLAYER_NAME];
if (PlayerInfo[playerid][pPlayerLogged] == 0) return SendClientMessage(playerid, COLOR_WHITE, "SERVER: You must be logged in to use this.");
if(PlayerInfo[playerid][pMobile] != 501)
{
if(PlayerInfo[playerid][pMobile] < 501)
{
SendClientMessage(playerid, COLOR_GREY, "INFO: You hanged up.");
SendClientMessage(PlayerInfo[playerid][pMobile], COLOR_GREY, "INFO: They hanged up.");
SetPlayerSpecialAction(PlayerInfo[playerid][pMobile], SPECIAL_ACTION_STOPUSECELLPHONE);
PlayerInfo[PlayerInfo[playerid][pMobile]][pMobile] = 501;
PlayerInfo[PlayerInfo[playerid][pMobile]][pRingTone] = 0;
PlayerInfo[playerid][pMobile] = 501;
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
GiveNameSpace(sendername);
format(string, sizeof(string), "* %s pockets their cellphone.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE);
return 1;
}
}
PlayerInfo[playerid][pRingTone] = 0;
SendClientMessage(playerid, COLOR_GREY, "INFO: Your phone is in your pocket.");
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
if(payphone[playerid] == 1)
{
TogglePlayerControllable(playerid,1);
payphone[playerid] = 0;
}
return 1;
}
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);// 26502
if(payphone[playerid] == 1) // 26503
{
TogglePlayerControllable(playerid,1);
payphone[playerid] = 0;
}
return 1; // 26508
}
Код:
../gamemodes/gm.pwn(26502) : error 021: symbol already defined: "SetPlayerSpecialAction" ../gamemodes/gm.pwn(26503) : error 010: invalid function or declaration ../gamemodes/gm.pwn(26508) : error 010: invalid function or declaration