hotkeys problem.. -
PHP код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if ((newkeys==KEY_YES)&&(GetPlayerState(playerid)==PLAYER_STATE_ONFOOT))
{
new pkid;
new pskin = GetPlayerSkin(playerid);
if(pskin == 265 || pskin == 266 || pskin == 282 || pskin == 280 || pskin == 281 || pskin == 284 || pskin == 285 || pskin == 286 || pskin == 287 || pskin == 288)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(pkid, x, y, z);
if(IsPlayerInRangeOfPoint(playerid, 5.0, x, y, z))
{
new pname[MAX_PLAYER_NAME], aname[MAX_PLAYER_NAME], string1[250], string2[256], string3[100], string4[100];
GetPlayerName(playerid, pname, sizeof(pname));
GetPlayerName(pkid, aname, sizeof(aname));
if (GetPlayerWantedLevel(pkid) >= 1)
{
cufftim = SetTimerEx("cufeer", 1000, false, "i", playerid);
return 1;
}
}
}
}
else
if ((newkeys==KEY_SUBMISSION)&&(GetPlayerState(playerid)==PLAYER_STATE_ONFOOT))
{
new pcolor = GetPlayerColor(playerid);
if (RobBurger[playerid] == 0 )
if(IsPlayerInRangeOfPoint(playerid,2.0,375.8449,-65.2709,1001.5078))
if(pcolor == COLOR_WHITE || pcolor == COLOR_RED)
{
CountDownTimerlisties = SetTimerEx("CountDownlisties", 1000, true, "i", playerid);
SendClientMessage(playerid, COLOR_GREEN, "You start robbing CrewBar!");
Robgym[playerid] = 1;
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+1);
timer6 = SetTimerEx("RobGym", 15000, false, "i", playerid);
SetTimerEx("after6", 50000, false, "i", playerid);
}
else
if (RobSex[playerid] == 0 )
if(IsPlayerInRangeOfPoint(playerid,2.0,-103.6512,-24.6736,1000.7188) || IsPlayerInRangeOfPoint(playerid,2.0,2476.2017,-1747.2950,13.1127) || IsPlayerInRangeOfPoint(playerid,2.0,2107.4668,-1789.6288,13.1291))
if(pcolor == COLOR_WHITE || pcolor == COLOR_RED)
{
if (GetPlayerVirtualWorld(playerid) == 22)
{
CountDownTimerlisties = SetTimerEx("CountDownlisties", 1000, true, "i", playerid);
SendClientMessage(playerid, COLOR_GREEN, "You start robbing SexShop2, stay here for 15 sec to complete the robbery!");
SetPlayerColor(playerid,COLOR_RED);
RobSex[playerid] = 1;
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+1);
timer13 = SetTimerEx("RobSex2", 15000, false, "i", playerid);
SetTimerEx("after13", 50000, false, "i", playerid);
}
else
if (GetPlayerVirtualWorld(playerid) == 13)
{
CountDownTimerlisties = SetTimerEx("CountDownlisties", 1000, true, "i", playerid);
SendClientMessage(playerid, COLOR_GREEN, "You start robbing SexShop1 ,stay here for 15 sec to complete the robbery!");
RobSex[playerid] = 1;
SetPlayerColor(playerid,COLOR_RED);
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+1);
timer12 = SetTimerEx("RobSex3", 15000, false, "i", playerid);
SetTimerEx("after12", 50000, false, "i", playerid);
}
}
}
return 1;
}
when i press yes or midle mouse button , nothing happends , but i want it with hotkey, may someone tell me whats wrong?? thanks guys , its really important
Re: hotkeys problem.. -
i think you need old keys too, add KEY_YES as old keys, just with new keys
Re: hotkeys problem.. -
Re: hotkeys problem.. -
No...
Re: hotkeys problem.. -
Re: hotkeys problem.. -
no.. still not working, but thanks for your time
Re: hotkeys problem.. -