Skripta koju koristim:UP
Detaljan opis problema:Radio sam nesto oko auta da moze poseban igrac uc u poseban auto
Dio skripte:[pawn]C:\Users\karan\Desktop\Fusion Gaming\gamemodes\EGaming.pwn(40991) : warning 206: redundant test: constant expression is non-zero
C:\Users\karan\Desktop\Fusion Gaming\gamemodes\EGaming.pwn(40991) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
[/pawn]
[pawn] else if(NiixiVozilo(vehicleid))
{
GetPlayerName(playerid, nadimcic, sizeof(nadimcic));
if(!strcmp(nadimcic, "Niixi" ), true))
{
SCM_FG(playerid, "Sta ces ti u betmobil , cibe bre!");
SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
}
}[/pawn]
linija 40991
[pawn] GetPlayerName(playerid, nadimcic, sizeof(nadimcic));[/pawn]
e sad zasto ispadaju ovi errori i da li treba ovako da moze igrac pod imenom Niixi da udje u auto a onaj ko pokusa da udje da mu ispisuje ovo "Sta ces ti u betmobil , cibe bre!" ??
Neke slike/video za lakse dobivanje pomoci(neobavezno)://
To bi ovako od prilike ispalo.
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if (vehicleid == 1) // Ovde definises ID tog vozila ja sam uzeo 1 kao primer
{
if (!strcmp(GetName(playerid), "Niixi", false)
{
SCM (playerid, -1, "Sta ces ti u betmobil , cibe bre!");
return 1;
}
}
return 1;
}
I evo ti stock GetName ako ga nemas.
stock GetName(playerid)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
return pName;
}