07.09.2007, 18:05
Bugs Found (yes ill keep on annoing you taxi
):
1. When i drive someones car and he does /callcar i crash sometimes, when i join back hes invisible or if i dont crash he can also be invisible.
2. /lock and /unlock dont work ( you didnt change /vlock /vunlock to /lock /unlock)
3. when im a passenger i can type /callcar ( this is annoing cuz then sometimes the car spawn infront of the one your in, suggestion to put a security on it like 1 time /callcar per 10/20 seconds )
EDIT:
Since 0.2.2 is out make a 0.2.2 version with /call that you get you phone and on awnser get it and on hang op putting it away
This is controlled by:
little sample of my mod to get your phone
This is the whole calling code i use now with the get your phone and hide your phone - Tested and works perfectly
):1. When i drive someones car and he does /callcar i crash sometimes, when i join back hes invisible or if i dont crash he can also be invisible.
2. /lock and /unlock dont work ( you didnt change /vlock /vunlock to /lock /unlock)
3. when im a passenger i can type /callcar ( this is annoing cuz then sometimes the car spawn infront of the one your in, suggestion to put a security on it like 1 time /callcar per 10/20 seconds )
EDIT:
Since 0.2.2 is out make a 0.2.2 version with /call that you get you phone and on awnser get it and on hang op putting it away
This is controlled by:
Код:
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USECELLPHONE); and SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
Код:
if(strcmp(cmd, "/call", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Usage: /call [playerid]");
return 1;
}
giveplayerid = strval(tmp);
if (PlayerInfo[playerid][logged] != 1)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be logged in to make a phone call!");
return 1;
}
if (GetPlayerMoney(playerid) < CALL_UNIT_COST)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You do not have enough money to make a phone call!");
return 1;
}
if (giveplayerid == playerid)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot call yourself!");
return 1;
}
if (!(IsPlayerConnected(giveplayerid)))
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "Inactive player id!");
return 1;
}
if (Calling[playerid] > -1)
{
GetPlayerName(Calling[playerid], giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "You are already on the phone to %s!", giveplayer);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
return 1;
}
if (Calling[giveplayerid] > -1)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "%s is already on the phone, try again later", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
else
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s is ringing you, type /answer to answer the call or /hangup to ignore it", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "You are ringing %s", giveplayer);
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USECELLPHONE);
SendClientMessage(playerid, COLOR_GREEN, string);
Calling[playerid] = giveplayerid;
Calling[giveplayerid] = playerid;
Callerid[playerid] = 1;
return 1;
}
if(strcmp(cmd, "/answer", true) == 0)
{
if (PlayerInfo[playerid][logged] != 1)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be logged in to answer a phone call!");
return 1;
}
if (Calling[playerid] == -1)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "Nobody is calling you!");
return 1;
}
if (Answered[playerid] == 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You are already on the phone!");
return 1;
}
else
GetPlayerName(Calling[playerid], giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s has answered your call, talk away", sendername);
SendClientMessage(Calling[playerid], COLOR_GREEN, string);
format(string, sizeof(string), "You have answered %s's call, talk away", giveplayer);
SendClientMessage(playerid, COLOR_GREEN, string);
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USECELLPHONE);
Answered[playerid] = 1;
Answered[Calling[playerid]] = 1;
Callerid[Calling[playerid]] = 1;
return 1;
}
if(strcmp(cmd, "/hangup", true) == 0)
{
if (PlayerInfo[playerid][logged] != 1)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be logged in to hang up a phone call!");
return 1;
}
if (Calling[playerid] == -1)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You are not on the phone!");
return 1;
}
else
{
GetPlayerName(Calling[playerid], giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s has hung up the phone on you", sendername);
SendClientMessage(Calling[playerid], COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "You have hung up on %s", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
Calling[playerid] = -1;
Answered[playerid] = 0;
Callerid[playerid] = 0;
}
return 1;
}

