string comparisson
#1

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");
        }
    } 
Reply
#2

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");
        }
    }
Reply
#3

Thanks! +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)