I don't understand why i am getting this.
#1

Код:
C:\Users\HCC\Desktop\Linux-Server\gamemodes\vx-rp.pwn(6023) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Something so simple...
pawn Код:
new Float:x, Float:y, Float:z;
                    GetPlayerPos(playerid, x, y, z);
                    if(IsPlayerInRangeOfPoint(playerid, 10.0, x, y, z))
                    {
                     SendClientMessage(playerid, COLOR_PURPLE, " %s Has Used Their Authorization Card To Open The Door" , szPlayerName);
                    }
                }
            }
Reply
#2

You cannot format a string inside of SendClientMessage. Use this instead:

pawn Код:
new Float:x, Float:y, Float:z, string[128];
                    GetPlayerPos(playerid, x, y, z);
                    if(IsPlayerInRangeOfPoint(playerid, 10.0, x, y, z))
                    {
                     format(string, sizeof(string), "%s has used their authorization card to open the door.", szPlayerName);
                     SendClientMessage(playerid, COLOR_PURPLE, string);
                    }
                }
            }
Reply
#3

Hey, I used this and it seems to choose a name out of random how i have it choose the name of the person who executed the command?

pawn Код:
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 231.099609, 119.532226, 1009.224426)) // Chief of Police
            {
                GetPlayerName(PlayerDoorName, MAX_PLAYER_NAME);
                if(playerVariables[playerid][pGroup] == 1 && playerVariables[playerid][pGroupRank] == 6) {
                    MoveDynamicObject(LSPDObjs[6][0],227.0,119.52929688,1009.22442627, 3.5);
                    MoveDynamicObject(LSPDObjs[6][1],229.75,119.53515625,1009.22442627, 3.5);
                    LSPDObjs[6][2] = 1;
                    PlayerPlaySoundEx(1083, 231.099609, 119.532226, 1009.224426);
                    SetTimerEx("ShutUp",4000,false,"d",6);
                    new string[128];
                    format(string, sizeof(string), "%s has used their authorization card to open the door.", szPlayerName);
                    nearByMessage(playerid, COLOR_PURPLE, string);
                }
            }
Reply
#4

pawn Код:
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 231.099609, 119.532226, 1009.224426)) // Chief of Police
            {
                new name[24];
                              GetPlayerName(playerid, name, sizeof(name));
                if(playerVariables[playerid][pGroup] == 1 && playerVariables[playerid][pGroupRank] == 6) {
                    MoveDynamicObject(LSPDObjs[6][0],227.0,119.52929688,1009.22442627, 3.5);
                    MoveDynamicObject(LSPDObjs[6][1],229.75,119.53515625,1009.22442627, 3.5);
                    LSPDObjs[6][2] = 1;
                    PlayerPlaySoundEx(1083, 231.099609, 119.532226, 1009.224426);
                    SetTimerEx("ShutUp",4000,false,"d",6);
                    new string[128];
                    format(string, sizeof(string), "%s has used their authorization card to open the door.", name);
                    nearByMessage(playerid, COLOR_PURPLE, string);
                }
            }
if this helped you + rep me so I can advertise my server when it is finished
Reply
#5

pawn Код:
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 231.099609, 119.532226, 1009.224426)) // Chief of Police
            {
                GetPlayerName(PlayerDoorName, MAX_PLAYER_NAME);
                if(playerVariables[playerid][pGroup] == 1 && playerVariables[playerid][pGroupRank] == 6) {
                    MoveDynamicObject(LSPDObjs[6][0],227.0,119.52929688,1009.22442627, 3.5);
                    MoveDynamicObject(LSPDObjs[6][1],229.75,119.53515625,1009.22442627, 3.5);
                    LSPDObjs[6][2] = 1;
                    PlayerPlaySoundEx(1083, 231.099609, 119.532226, 1009.224426);
                    SetTimerEx("ShutUp",4000,false,"d",6);
                    new string[128];
                    new pName[24];
                    GetPlayerName(playerid,pName,24);
                    format(string, sizeof(string), "%s has used their authorization card to open the door.", szPlayerName, pName);
                    nearByMessage(playerid, COLOR_PURPLE, string);
                }
            }
I am not sure, but try this.
Reply
#6

pawn Код:
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 231.099609, 119.532226, 1009.224426)) // Chief of Police
            {
                GetPlayerName(playerid,PlayerDoorName, MAX_PLAYER_NAME);
                if(playerVariables[playerid][pGroup] == 1 && playerVariables[playerid][pGroupRank] == 6) {
                    MoveDynamicObject(LSPDObjs[6][0],227.0,119.52929688,1009.22442627, 3.5);
                    MoveDynamicObject(LSPDObjs[6][1],229.75,119.53515625,1009.22442627, 3.5);
                    LSPDObjs[6][2] = 1;
                    PlayerPlaySoundEx(1083, 231.099609, 119.532226, 1009.224426);
                    SetTimerEx("ShutUp",4000,false,"d",6);
                    new string[128];
                    format(string, sizeof(string), "%s has used their authorization card to open the door.", PlayerDoorName);
                    nearByMessage(playerid, COLOR_PURPLE, string);
                }
            }
Reply
#7

Quote:
Originally Posted by eesh
Посмотреть сообщение
pawn Код:
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 231.099609, 119.532226, 1009.224426)) // Chief of Police
            {
                GetPlayerName(playerid,PlayerDoorName, MAX_PLAYER_NAME);
                if(playerVariables[playerid][pGroup] == 1 && playerVariables[playerid][pGroupRank] == 6) {
                    MoveDynamicObject(LSPDObjs[6][0],227.0,119.52929688,1009.22442627, 3.5);
                    MoveDynamicObject(LSPDObjs[6][1],229.75,119.53515625,1009.22442627, 3.5);
                    LSPDObjs[6][2] = 1;
                    PlayerPlaySoundEx(1083, 231.099609, 119.532226, 1009.224426);
                    SetTimerEx("ShutUp",4000,false,"d",6);
                    new string[128];
                    format(string, sizeof(string), "%s has used their authorization card to open the door.", PlayerDoorName);
                    nearByMessage(playerid, COLOR_PURPLE, string);
                }
            }
Either what I posted or this one will work.
Reply
#8

pawn Код:
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 231.099609, 119.532226, 1009.224426)) // Chief of Police
            {
                new name[24];
                GetPlayerName(playerid, name, 24);
                if(playerVariables[playerid][pGroup] == 1 && playerVariables[playerid][pGroupRank] == 6) {
                    MoveDynamicObject(LSPDObjs[6][0],227.0,119.52929688,1009.22442627, 3.5);
                    MoveDynamicObject(LSPDObjs[6][1],229.75,119.53515625,1009.22442627, 3.5);
                    LSPDObjs[6][2] = 1;
                    PlayerPlaySoundEx(1083, 231.099609, 119.532226, 1009.224426);
                    SetTimerEx("ShutUp",4000,false,"d",6);
                    new string[128];
                    format(string, sizeof(string), "%s has used their authorization card to open the door.", name);
                    nearByMessage(playerid, COLOR_PURPLE, string);
                }
            }
Use this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)