SA-MP Forums Archive
string comparisson - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: string comparisson (/showthread.php?tid=598598)



string comparisson - Squirrel - 14.01.2016

Alright so I want to check if the plates exist but Im not sure how...

PHP код:
new platesnow[32];
for(new 
0MAX_VEHICLESx++) {
        if(
IsValidVehicle(x)) {
            if(
MyPlates[x] == platesnow) return Msg(playerid,COLOR_RED,"These plates already exist");
        }
    } 



Re: string comparisson - Eth - 14.01.2016

pawn Код:
new platesnow[32];
for(new x = 0; x < MAX_VEHICLES; x++) {
        if(IsValidVehicle(x)) {
            if(!strcmp(MyPlates[x],platesnow)) return Msg(playerid,COLOR_RED,"These plates already exist");
        }
    }



Re: string comparisson - Squirrel - 14.01.2016

Thanks! +rep