help with code/error - 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: help with code/error (
/showthread.php?tid=91980)
help with code/error -
pepper - 17.08.2009
i keep getting this error with this code
Код:
C:\PROGRA~1\ROCKST~1\GTASAN~1\pawno\MWRPbeta.pwn(7651) : error 010: invalid function or declaration
C:\PROGRA~1\ROCKST~1\GTASAN~1\pawno\MWRPbeta.pwn(7656) : error 010: invalid function or declaration
C:\PROGRA~1\ROCKST~1\GTASAN~1\pawno\MWRPbeta.pwn(7658) : error 010: invalid function or declaration
C:\PROGRA~1\ROCKST~1\GTASAN~1\pawno\MWRPbeta.pwn(7659) : error 010: invalid function or declaration
C:\PROGRA~1\ROCKST~1\GTASAN~1\pawno\MWRPbeta.pwn(7662) : error 010: invalid function or declaration
C:\PROGRA~1\ROCKST~1\GTASAN~1\pawno\MWRPbeta.pwn(7666) : error 010: invalid function or declaration
Код:
7651 if(PlayerInfo[playerid][pSeatBelt] == 1)
{
[playerid][pSeatBelt] = 0;
new stringtosee[255];
new sendername[MAX_PLAYER_NAME];
7656(playerid, sendername, sizeof(sendername));
new ftext[255];
7658if(PlayerInfo[playerid][pSex] == 1) { ftext = "his"; }
7659else if(PlayerInfo[playerid][pSex] == 1) { ftext = "her"; }
format(stringtosee, sizeof(stringtosee), "* %s unbuckles %s seat belt", sendername , ftext);
ProxDetector(30.0, playerid, stringtosee, 0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA);
7662return 1;
}
7666return 1;
}
Re: help with code/error -
Eazy_Efolife - 17.08.2009
Just download the FS and paste it your script!
Re: help with code/error -
pepper - 17.08.2009
this ant off a fliter script its off a GM i copied it all and this is what i got
Re: help with code/error -
Eazy_Efolife - 17.08.2009
oh, why dont you make your own!
and not take others? but since some people never learn I scripted it for you!
I was planning to release this but who gives!
On Top of Script!
Код:
new Seatbelt[MAX_PLAYERS];
under on player command text
Код:
if(strcmp(cmd, "/seatbelt", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid == 0))
{
SendClientMessage(playerid, COLOR_GREEN, "Your not in a car!");
}
if(IsPlayerInAnyVehicle(playerid) == 1 && Seatbelt[playerid] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
Seatbelt[playerid] = 1;
SendClientMessage(playerid, COLOR_WHITE, "You have put on a seatbelt.");
format(string, sizeof(string), "* %s grabs his seatbelt and clicks it in", sendername);
ProxDetector(30.0, playerid, string, red,red,red,red,red);
return 1;
}
else if(IsPlayerInAnyVehicle(playerid) == 1 && Seatbelt[playerid] == 1)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
Seatbelt[playerid] = 0;
SendClientMessage(playerid, COLOR_WHITE, "You have taken off your seatbelt");
format(string, sizeof(string), "* %s grabs his seatbelt and unclicks it", sendername);
ProxDetector(30.0, playerid, string, red,red,red,red,red);
return 1;
}
}
You owe me =)