I need help!! - 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)
+--- Thread: I need help!! (
/showthread.php?tid=319010)
I need help!! -
Youice - 17.02.2012
Hello guys , I'm a new scripter here and I making my first RP script alone but of course I would face allot of problems/errors.... Any way here is my problem.
SCRIPT::
Код:
public RespawnHospital(playerid)
{
SendClientMessage(playerid, COLOR_RED, "Youhave been sent to the hospital imediatly!");
SendClientMessage(playerid, COLOR_RED, "any weapon(s) was with is taken due to the surgery!");
SendClientMessage(playerid, 0xFF00CC, "You need now to rest.");
SetPlayerPos(playerid, 1221.7010,-1328.6449,13.4821);
SetPlayerCameraPos(playerid, 1204.3781,-1313.3323,16.3984);
SetPlayerCameraLookAt(playerid, 1174.7167,-1323.4485,14.5938);
TogglePlayerControllable(playerid,0);
SetTimerEx("DEAD1", 50000, 0,"d",playerid);
SendClientMessage(playerid, 0xFF00CC, "You have paid 1000 for your surgery, have a nice day");
GivePlayerMoney(playerid, -1000);
}
if(PlayerInfo[playerid][Fleader] == 1)
{
SendClientMessage(playerid, 0xFF00CC, "You have paid 800 for your surgery.");
GivePlayerMoney(playerid, -800);
}
}
if(PlayerInfo[playerid][Credit] >= 0)
{
SendClientMessage(playerid, 0xFF00CC, "You have paid 500 for your surgery.");
GivePlayerMoney(playerid, -500);
return 1;
}
ERRORS::
Код:
C:\Users\BCC\Desktop\RP script\gamemodes\ERP2.pwn(2448) : error 010: invalid function or declaration
C:\Users\BCC\Desktop\RP script\gamemodes\ERP2.pwn(2454) : error 010: invalid function or declaration
C:\Users\BCC\Desktop\RP script\gamemodes\ERP2.pwn(2458) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
If you know what's my problem please post it , Thanks....
Re: I need help!! -
Twisted_Insane - 17.02.2012
Comment the lines in the code so I can look where the mistake is!
Re: I need help!! -
C0d3.03 - 17.02.2012
Can you post the code with the line number plz ? then we may help you
!
Re: I need help!! -
Youice - 17.02.2012
Okay here you go...
Код:
if(PlayerInfo[playerid][Fleader] == 1)//error number 1
{
SendClientMessage(playerid, 0xFF00CC, "You have paid 800 for your surgery.");
GivePlayerMoney(playerid, -800);
}
}
if(PlayerInfo[playerid][Credit] >= 0)//error number 2
{
SendClientMessage(playerid, 0xFF00CC, "You have paid 500 for your surgery.");
GivePlayerMoney(playerid, -500);
return 1;//error number 3
}
Re: I need help!! -
johnnyman1 - 17.02.2012
Код:
public RespawnHospital(playerid)
{
SendClientMessage(playerid, COLOR_RED, "Youhave been sent to the hospital imediatly!");
SendClientMessage(playerid, COLOR_RED, "any weapon(s) was with is taken due to the surgery!");
SendClientMessage(playerid, 0xFF00CC, "You need now to rest.");
SetPlayerPos(playerid, 1221.7010,-1328.6449,13.4821);
SetPlayerCameraPos(playerid, 1204.3781,-1313.3323,16.3984);
SetPlayerCameraLookAt(playerid, 1174.7167,-1323.4485,14.5938);
TogglePlayerControllable(playerid,0);
SetTimerEx("DEAD1", 50000, 0,"d",playerid);
SendClientMessage(playerid, 0xFF00CC, "You have paid 1000 for your surgery, have a nice day");
GivePlayerMoney(playerid, -1000);
if(PlayerInfo[playerid][Fleader] == 1)
{
SendClientMessage(playerid, 0xFF00CC, "You have paid 800 for your surgery.");
GivePlayerMoney(playerid, -800);
}
if(PlayerInfo[playerid][Credit] >= 0)
{
SendClientMessage(playerid, 0xFF00CC, "You have paid 500 for your surgery.");
GivePlayerMoney(playerid, -500);
return 1;
}
}
This should work..
Re: I need help!! -
Youice - 17.02.2012
Thanks it worked , Thanks for every one