error 033: array must be indexed (variable "cName")
#1

Hi!, im lost on how to get the vehicles name and display it when spawned like this.

i have tried the following but i have failed.


Код:
new cName[200];
if(carid = 520)*then cName == "Hydra");
format(string, sizeof(string), "You spawned vehicleid %d (%s)", carid, cName);
I have never dealt with this before and i think i'm doing it completely wrong.
Reply
#2

if(carid == 520) { cName = "Hydra"); }

or use strmid
Reply
#3

pawn Код:
new cName[30];
if (carid == 520) format(cName,sizeof(cName),"Hydra");
format(string, sizeof(string), "You spawned vehicleid %d (%s)", carid, cName);
Reply
#4

Thanks! It Works
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)