13.09.2018, 12:28
Hello I am having problem on this code:
Error lines:
CellPhone enum:
PHP код:
COMMAND:hangup(playerid,params[])
{
if(CellPhone[playerid][talking])
{
if(CellPhone[playerid][calledby])
{
SendClientMessage(CellPhone[playerid][calledby], -1, "Cellphone: They hung up.");
printf("Called by : %i", CellPhone[playerid][calledby]);
SendClientMessage(playerid, -1, "Cellphone: You hung up.");
CellPhone[calledby][talking]=0;
CellPhone[calledby][callingto] = 0;
CellPhone[playerid][talking]=0;
CellPhone[playerid][calledby] = 0;
}else{
if(CellPhone[playerid][callingto])
{
printf("Calling to : %i", CellPhone[playerid][callingto]);
SendClientMessage(CellPhone[playerid][callingto], -1, "Cellphone: They hung up.");
SendClientMessage(playerid, -1, "Cellphone: You hung up.");
CellPhone[callingto][talking] = 0;
CellPhone[callingto][calledby] = 0;
CellPhone[playerid][talking] = 0;
CellPhone[playerid][callingto] = 0;
}
}
}
return 1;
}
PHP код:
CellPhone[calledby][talking]=0;
CellPhone[calledby][callingto] = 0;
PHP код:
enum CellPhoneEnum{
calledby,
callingto,
talking,
talkingtime,
ringingtime,
totalring
};