Warnings
#1

Код:
warning 219: local variable "X" shadows a variable at a preceding level
warning 219: local variable "Y" shadows a variable at a preceding level
warning 219: local variable "Z" shadows a variable at a preceding level
what these warnings mean? and how to fix them? I have 12 of them...

also - why cars, that spawning after typed command not spawn? after I type /gmx they work... samp bug, or what?

Reply
#2

You already have made these floats once.
Reply
#3

ok, now I fixed warnings, but how can I fix that other thing I posted?
before it worked - i don't know what I did to make them not work...
Reply
#4

anyone?
Reply
#5

What's the problem? The vehicles get loaded only after /gmx?
Reply
#6

no, problem is only with vehicles whats spawn after command typed.

on of my commands:

Код:
if(strcmp(cmdtext, "/nrg", true) == 0)	{
		if (gPlayerLevel[playerid] >= 1)
		if (IsPlayerInAnyVehicle(playerid)) {
		SendClientMessage(playerid,0xFF0606FF,"You already have a car!");
		} else {
	  new Float:Angle;
		new VehicleID;
		GetPlayerPos(playerid,X,Y,Z); GetPlayerFacingAngle(playerid,Angle);
	  VehicleID = CreateVehicle(522,X,Y,Z,Angle,1,-1,-1);	PutPlayerInVehicle(playerid,VehicleID,0);
		if(GetPlayerInterior(playerid)) LinkVehicleToInterior(VehicleID,GetPlayerInterior(playerid));
		SetVehicleVirtualWorld(VehicleID,GetPlayerVirtualWorld(playerid));
		ChangeVehicleColor(VehicleID,0,7);
		SendClientMessage(playerid,0x33AA33AA,"Enjoy");
	 	if (gPlayerLevel[playerid] < 1)
    SendClientMessage(playerid, 0xFF0606FF, "You are not allowed to use this command!");
	}
		return 1;
	}
when I put the cmd in other gm, it works

p.s.
Код:
if (gPlayerLevel[playerid] >= 1)
^ that is part of my levels system
Reply
#7

I still don't understand you.
When doesn't it work?
Reply
#8

if i type command /nrg - car have to spawn next to me.
but when i type /nrg - shows message ''enjoy'', but car is missing
when i type /gmx - it works
Reply
#9

I don't understand you.
You actualy just said if you type /nrg it works
Then you said if you type /nrg it doesn't..
Reply
#10

step by step...

1 - i join my server
2 - i type cmd /nrg - nothing happens
3 - i type /gmx (it restarts my gm)
4 - i type /nrg - i've got my car

i can't explain better..
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)