can someone help to fix this code - 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: can someone help to fix this code (
/showthread.php?tid=116973)
can someone help to fix this code -
rs2fun111 - 30.12.2009
i tryd to make cop command with score
and i got some errors can someone please help to fix it?
pawn Код:
if (strcmp("/becomecop", cmdtext, true, 10) == 0)
{
if PlayerScore(playerid ,600 == true
SendClientMessage(playerid,0xFFFFFFFF,"You Are Now Cop! Type /cophelp");
SetPlayerSkin(playerid, 40);
SetPlayerPos(playerid, 2495.2885742188,-1688.7947998047,14.029055595398);
}
else
{
if PlayerScore(playerid ,600 == false
SendClientMessage(playerid,0xFFFFFFFF,"You Need Atleast 600 Score Point To Become Cop!");
return 1;
}
error
Код:
C:\Users\kalvi\Desktop\sa-mp\pawno\include\IsPlayerLAdmin.inc(15) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\kalvi\Desktop\sa-mp\pawno\include\IsPlayerLAdmin.inc(32) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\kalvi\Desktop\sa-mp\gamemodes\kfsr2.pwn(976) : warning 217: loose indentation
C:\Users\kalvi\Desktop\sa-mp\gamemodes\kfsr2.pwn(1104) : error 017: undefined symbol "PlayerScore"
C:\Users\kalvi\Desktop\sa-mp\gamemodes\kfsr2.pwn(1111) : error 017: undefined symbol "PlayerScore"
C:\Users\kalvi\Desktop\sa-mp\gamemodes\kfsr2.pwn(1524) : warning 203: symbol is never used: "gPlayerClass"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Re: can someone help to fix this code -
MadeMan - 30.12.2009
pawn Код:
if (strcmp("/becomecop", cmdtext, true, 10) == 0)
{
if (GetPlayerScore(playerid) >= 600)
{
SendClientMessage(playerid,0xFFFFFFFF,"You Are Now Cop! Type /cophelp");
SetPlayerSkin(playerid, 40);
SetPlayerPos(playerid, 2495.2885742188,-1688.7947998047,14.029055595398);
}
else
{
SendClientMessage(playerid,0xFFFFFFFF,"You Need Atleast 600 Score Point To Become Cop!");
}
return 1;
}
Re: can someone help to fix this code -
rs2fun111 - 30.12.2009
thanks