28.06.2009, 23:59
Код:
NewEnter(playerid, Float:x, Float:y, Float:z, universeID, Float:newX, Float:newY, Float:newZ){
idCounter = 0;
while(EnterSigns[idCounter][UNIVERSEID] != 9999 && idCounter != MAXENTERS){
idCounter++;
}
if(idCounter == MAXENTERS && playerid != -1){
SendClientMessage(playerid,COLOR_WHITE,"Maximum number of enter locations hit!");
}
else{
new aString[128];
EnterSigns[idCounter][PICKUPID] = CreatePickup(1239,23,x,y,z);
EnterSigns[idCounter][ENTERX] = x;
EnterSigns[idCounter][ENTERY] = y;
EnterSigns[idCounter][ENTERZ] = z;
EnterSigns[idCounter][UNIVERSEID] = universeID;
EnterSigns[idCounter][INTX] = newX;
EnterSigns[idCounter][INTY] = newY;
EnterSigns[idCounter][INTZ] = newZ;
if(playerid != -1){
format(aString,sizeof(aString),"Enter point from %f, %f, %f to Universe %i: %f, %f, %f with ID %i.",EnterSigns[idCounter][ENTERX],EnterSigns[idCounter][ENTERY],EnterSigns[idCounter][ENTERZ],EnterSigns[idCounter][UNIVERSEID],EnterSigns[idCounter][INTX],EnterSigns[idCounter][INTY],EnterSigns[idCounter][INTZ],idCounter);
SendClientMessage(playerid,COLOR_WHITE,aString);
}
}
idCounter = 0;
}
Код:
NewVehicle(playerid, modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2){
idCounter = 0;
while(Vehicles[idCounter][MODELID] != 9999 && idCounter != MAXVEHICLES){
idCounter++;
}
if(idCounter == MAXVEHICLES && playerid != -1){
SendClientMessage(playerid,COLOR_WHITE,"Maximum number of vehicles hit!");
}
else{
new aString[128];
Vehicles[idCounter][VEHICLEID] = CreateVehicle(modelid, x, y, z, angle, color1, color2, 1200);
Vehicles[idCounter][X] = x;
Vehicles[idCounter][Y] = y;
Vehicles[idCounter][Z] = z;
Vehicles[idCounter][ANGLE] = angle;
Vehicles[idCounter][COLOR1] = color1;
Vehicles[idCounter][COLOR2] = color2;
if(playerid != -1){
format(aString,sizeof(aString),"ID: %i, SLOT: %i",Vehicles[idCounter][VEHICLEID],idCounter);
SendClientMessage(playerid,COLOR_WHITE,aString);
}
}
}
Код:
Vehicles[idCounter][MODELID] != 9999
Код:
foward Blah();
public Blah(){
}
Код:
error 010: invalid function or declaration warning 235: public function lacks forward declaration (symbol "Blah")

