mmb button
#1

PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if(
newkeys == KEY_LOOK_BEHIND)
    {
    
cmd_ar(playerid, (GetClosestPlayerID);
    return 
1;
    } 
pls fix it
Reply
#2

Fix what? Does it compile? Does it work? Does it fail? If it doesn't work WHERE are the errors
Reply
#3

(1795 : error 076: syntax error in the expression, or invalid function call
(1795 : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#4

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_LOOK_BEHIND)
    {
        cmd_ar(playerid,(GetClosestPlayerID));
    }
    return 1;
}
Reply
#5

PHP код:
CMD:ar(playeridparams[])
{
    new 
rangepass 0vehiclepass 0wantedpass 0dutypass 0eventpass 0arrestpass 0;
    if(
GetTeam{playerid} == CLASS_CIV || GetTeam{playerid} == CLASS_MEDIC) return SendClientMessage(playeridRED"Only law enforcement can arrest players.");
    if(
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playeridRED"You cant arrest players from a vehicle.");
    foreach(
Playeri)
    {
        if(
== playerid) continue;
        new 
Float:xFloat:yFloat:z;
        
GetPlayerPos(ixyz);
        new 
Float:hp;
        
GetPlayerHealth(ihp);
        if(
hp 0.0)
        if(
IsPlayerInRangeOfPoint(playerid8.0xyz) && GetPlayerInterior(playerid) == GetPlayerInterior(i) && GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
        {
             
rangepass++;
            if(
GetPlayerWantedLevel(i) >= 4)
            {
                
wantedpass++;
                if(!
IsPlayerInAnyVehicle(i))
                {
                    
vehiclepass++;
                    if(
IsOnduty{i} == 0)
                    {
                        
dutypass++;
                        if(
IsAtEvent{i} == 0)
                        {
                            
eventpass++;
                            if(
HasBeenArrested{i} == false)
                            {
                                
arrestpass++;
                                if(
GetTeam{playerid} == CLASS_COPS)
                                {
                                    
PlayerInfo[i][pArrests] ++;
                                    
TogglePlayerControllable(ifalse);
                                    
GameTextForPlayer(i"~r~Arrested!"30005);
                                    
format(fstrsizeof(fstr), "Officer %s (%d) has just arrested you."GetName(playerid), playerid);
                                    
SendClientMessage(iCOLOR_AQUAfstr);
                                    
GameTextForPlayer(playerid,"~w~Suspect ~g~Arrested.",5000,5);
                                    
SetPlayerScore(playeridGetPlayerScore(playerid) + 1);
                                    new 
pay random(10000) + 5000;
                                    
GivePlayerCash(playeridpay);
                                    
PlayerInfo[playerid][pTakedowns] ++;
                                    
ApplyAnimation(playerid"ped""ARRESTgun"4.101111);
                                    
format(fstr2sizeof(fstr2), "%s (%d) has been arrested by Officer %s (%d)"GetName(i), iGetName(playerid), playerid);
                                    
SendClientMessageToAll(COLOR_AQUAfstr2);
                                    
SetPlayerScore(iGetPlayerScore(i) - 1);
                                    
SetPlayerSpecialAction(iSPECIAL_ACTION_HANDSUP);
                                    
SetTimerEx("SendPlayerToJail"3000false"d"i);
                                    
HasBeenArrested{i} = true
there is my arrest cmd and fasil i got 9 errors
Reply
#6

Post the errors and paste the whole ar command.
Reply
#7

bump? dont know no one?
Reply
#8

(1795 : error 076: syntax error in the expression, or invalid function call
(17985) : error 010: invalid function or declaration

PHP код:
 17958:  cmd_ar(playerid,(GetClosestPlayerID)); 
Reply
#9

Alright, paste the ar command. The whole command.
Reply
#10

pawn Код:
cmd_ar(playerid,(GetClosestPlayerID));
Closest to whom? Isn't it obvious that there is missing a parameter?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)