SA-MP Forums Archive
it gives Warning? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: it gives Warning? (/showthread.php?tid=226787)



it gives Warning? - Roomeo - 16.02.2011

Help me Pleaze

look on the Picture.




Re: it gives Warning? - PowerPC603 - 16.02.2011

Can you move that window out of the way, so we can see the code on the lines where the errors are?


Re: it gives Warning? - SmugglesJr - 16.02.2011

under this part

pawn Код:
if (strcmp("/p...", cmd, true) == 0)

make it like this

if (strcmp("/p...", cmd, true) == 0)
{
then at this part

pawn Код:
SendClientMessage(playerid, COLOR_...,"...");

put return 1; so like this

SendClientMessage(playerid, COLOR_...,"...");
return 1;
then at this part

pawn Код:
return 1;
}

make it like this

    SendClientMessage(playerid, COLOR_...,"...");
    return 1;
}
hope this helps


Re: it gives Warning? - Roomeo - 16.02.2011

it's fixed Now the Problem is this

i have this
if (strcmp("/ParkDM", cmdtext, true, 10) == 0)
SetPlayerPos(playerid, 2785.9299,10.8203,259.9806);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,26,1100);
GivePlayerWeapon(playerid,31,3500);
GivePlayerWeapon(playerid,16,5);
GivePlayerWeapon(playerid, 26, 10000);
SetPlayerSkin(playerid,287);
SendClientMessage(playerid, COLOR_YELLOW, "Teleported to ParkDM");

But in Game when i type /parkDM it don't Go To The PLace i want it "SetPlayerPos(playerid, 2785.9299,10.8203,259.9806);" what is wrong in this?

This is Savedpositions

0,1171.6135,2785.9299,10.8203,259.9806,0,0,0,0,0,0


Re: it gives Warning? - Roomeo - 16.02.2011

Pleaze Help
Sorry For Double Post


Re: it gives Warning? - Stigg - 16.02.2011

Use this:

SetPlayerPos(playerid,1171.6135,2785.9299,10.8203) ;
You had cord's mixed up.

Peace...


Re: it gives Warning? - JaTochNietDan - 16.02.2011

You're setting his angle co-ordinate as the z co-ordinate, which will cause problems. You should set the position to:

1171.6135,2785.9299,10.8203

According to your SavedPosition.txt file.

Edit: Too slow


Re: it gives Warning? - Roomeo - 16.02.2011

Wohooo Thanx I Now Can Script lol Thanks FOr Help!


Re: it gives Warning? - Zack9764 - 16.02.2011

It should be
Код:
if (strcmp("/ParkDM", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, 2785.9299,10.8203,259.9806);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,26,1100);
GivePlayerWeapon(playerid,31,3500);
GivePlayerWeapon(playerid,16,5);
GivePlayerWeapon(playerid, 26, 10000);
SetPlayerSkin(playerid,287);
SendClientMessage(playerid, COLOR_YELLOW, "Teleported to ParkDM");
return 1;
}



Re: it gives Warning? - Roomeo - 16.02.2011

Thanks anything Done but ingame when i type /aa or /a or /b or /something Anything with i.e /Noob i goto /parkDm why? anyone know how to fix it?