Converting !
#1

pawn Код:
public OnPlayerCommandText(playerid, cmdtext)
{
    if(!strcmp("/carwash", cmdtext, true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 1084227584, 1156507145, 3302951282, 1095845911))
        {
            if(IsPlayerInAnyVehicle(playerid))
            {
                if(GetPlayerState(playerid) == 2)
                {
                    new var0 = 0;
                    while(++var0 < 89)
                    {
                        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == glob2C[var0][0])
                        {
                            SendClientMessage(playerid, 0xAA3333AA, "You cannot have this vehicle washed.");
                            return 1;
                        }
I need this to be ZCMD instead of STRCMP if any one can do it and thanks
Reply
#2

pawn Код:
CMD:carwash(playerid, parmas[])
    {
        if(IsPlayerInRangeOfPoint(playerid, 1084227584, 1156507145, 3302951282, 1095845911))
        {
            if(IsPlayerInAnyVehicle(playerid))
            {
                if(GetPlayerState(playerid) == 2)
                {
                    new var0 = 0;
                    while(++var0 < 89)
                    {
                        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == glob2C[var0][0])
                        {
                            SendClientMessage(playerid, 0xAA3333AA, "You cannot have this vehicle washed.");
                            return 1;
                        }
Reply
#3

Код:
CMD:carwash(playerid, params [])
{
        if(IsPlayerInRangeOfPoint(playerid, 1084227584, 1156507145, 3302951282, 1095845911))
        {
            if(IsPlayerInAnyVehicle(playerid))
            {
                if(GetPlayerState(playerid) == 2)
                {
                    new var0 = 0;
                    while(++var0 < 89)
                    {
                        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == glob2C[var0][0])
                        {
                            SendClientMessage(playerid, 0xAA3333AA, "You cannot have this vehicle washed.");
                            return 1;
                        }
                    }
                }
            }
        }
        return 1;
}
Reply
#4

Now i have these errors:
pawn Код:
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(141) : error 035: argument type mismatch (argument 1)
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(141) : warning 213: tag mismatch
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(151) : warning 213: tag mismatch
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(176) : warning 213: tag mismatch
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(176) : error 035: argument type mismatch (argument 3)
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(187) : warning 213: tag mismatch
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(187) : error 035: argument type mismatch (argument 3)
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(192) : error 010: invalid function or declaration
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(389) : warning 213: tag mismatch
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(389) : error 035: argument type mismatch (argument 3)
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(393) : warning 203: symbol is never used: "carwash"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
Reply
#5

Quote:
Originally Posted by CaRa
Посмотреть сообщение
Код:
CMD:carwash(playerid, params [])
{
        if(IsPlayerInRangeOfPoint(playerid, 1084227584, 1156507145, 3302951282, 1095845911))
        {
            if(IsPlayerInAnyVehicle(playerid))
            {
                if(GetPlayerState(playerid) == 2)
                {
                    new var0 = 0;
                    while(++var0 < 89)
                    {
                        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == glob2C[var0][0])
                        {
                            SendClientMessage(playerid, 0xAA3333AA, "You cannot have this vehicle washed.");
                            return 1;
                        }
                    }
                }
            }
        }
        return 1;
}
Put this command where you want in your gamemode not in Onplayercommandtext.
Reply
#6

Place it outside any callback.
Reply
#7

But i want it in an FS so i want it under OnPlayerCommandText i do not want it in my GM is that possible ?
Reply
#8

We Can make it as FS but better add it in the gamemode
Reply
#9

So ?!?!? i just need it in an FS because not only this command is in the FS so if i wanted it to be in the GM i will do many things
Reply
#10

Man don't add under onplayercommandtext
Because it is ZCMD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)