C:\Users\*\Desktop\SAMP Server\gamemodes\server.pwn(303) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
C:\Users\*\Desktop\SAMP Server\gamemodes\server.pwn(313) : warning 213: tag mismatch
C:\Users\*\Desktop\SAMP Server\gamemodes\server.pwn(313) : warning 213: tag mismatch
C:\Users\*\Desktop\SAMP Server\gamemodes\server.pwn(343) : error 017: undefined symbol "f1"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Code
enum carEnum{
id_x,
besitzer[MAX_PLAYER_NAME],
Float:c_x,
Float:c_y,
Float:c_z,
Float:c_r,
Float:c_f1,
Float:c_f2
}
Code
createPlayerCar(playerid,modelid,Float:x,Float:y,Float:z,Float:r,Float:f1,Float:f2)
{
for(new i=0; i<sizeof(cInfo); i++)
{
if(cInfo[i][id_x]!=0)continue;
GetPlayerName(playerid,cInfo[i][besitzer],MAX_PLAYER_NAME);
cInfo[i][c_x]=x;
cInfo[i][c_y]=y;
cInfo[i][c_z]=z;
cInfo[i][c_r]=r;
cInfo[i][c_f1]=f1;
cInfo[i][c_f2]=f2;
cInfo[i][id_x] = CreateVehicle(modelid,x,y,z,r,f1,f2,-1);
new string[128];
format(string,sizeof(string),"Das Auto cInfo[%i] wurde erstellt.",i);
SendClientMessageToAll(COLOR_RED,string);
return 1;
}
return 1;
}
Alles anzeigen
Code
//Auto Spawnen
ocmd:createcar(playerid,params[])
{
if(!isAdmin(playerid,3))return SendClientMessage(playerid,COLOR_RED,"Du hast kein Zugriff auf diesen Befehl!");
new mID,pID;
if(sscanf(params,"ui",mID))return SendClientMessage(playerid,COLOR_SPRINGGREEN,"INFO: /createcar [playerid] [id]");
if(mID<400||mID>611)return SendClientMessage(playerid,COLOR_SPRINGGREEN,"ERROR: Falsche Fahrzeug ID!");
new Float:xc,Float:yc,Float:zc,Float:rc;
GetPlayerPos(pID,xc,yc,zc);
GetPlayerFacingAngle(pID,rc);
createPlayerCar(pID,mID,xc,yc,zc,rc,f1,f2);
return 1;
}
Alles anzeigen