Help with Wanted - 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: Help with Wanted (
/showthread.php?tid=481143)
Help with Wanted -
Eliminator - 14.12.2013
Hello!
PHP код:
if (strcmp(cmdtext, "/sfap", true) == 0)
{
if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetVehiclePos(GetPlayerVehicleID(playerid), -1548.4060,-433.5984,6.0000);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 319.9333);
}
else
{
SetPlayerPos(playerid, -1548.7957,-443.3555,6.1024);
SetPlayerFacingAngle(playerid, 338.4202);
SendClientMessage(playerid,COLOR_GREEN,"Welcome to San Fierro Airport");
}
SetCameraBehindPlayer(playerid);
return 1;
}
So i tryed this! it's some teleport
didn't work
But what i need is When a WANTED Player do this command he can't but if he's not wanted he can
So Please help.. .+rep
Re: Help with Wanted -
PrivatioBoni - 14.12.2013
pawn Код:
if(!strcmp(cmdtext, "/rp", true))
{
if(!GetPlayerWantedLevel(playerid)) return SendClientMessage(playerid, , "You Are wanted! You cannot fix your Car! Wait For cops!");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!");
else
{
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been successfully repaired!");
}
return 1;
}
I think you forgot the else. Excuse my poor indentation.
Uh, I swear your OP was about repair. Now it's about something entirely different..
Just seen your rep - thanks. I'm not sure how to fix your most recent problem.
Millionth edit: Actually, I think I'm wrong, I don't think you need an else.
Re: Help with Wanted -
Eliminator - 14.12.2013
AnyOne Else?
Re: Help with Wanted -
Kyance - 14.12.2013
Try this one.
pawn Код:
if (strcmp(cmdtext, "/sfap", true) == 0)
{
new wantedlevel;
wantedlevel = GetPlayerWantedLevel(playerid);
if(wantedlevel > 0) return SendClientMessage(playerid,COLOR_GREEN,"* You can't use this command while being wanted!");
if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetVehiclePos(GetPlayerVehicleID(playerid), -1548.4060,-433.5984,6.0000);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 319.9333);
}
else
{
SetPlayerPos(playerid, -1548.7957,-443.3555,6.1024);
SetPlayerFacingAngle(playerid, 338.4202);
SendClientMessage(playerid,COLOR_GREEN,"Welcome to San Fierro Airport");
}
SetCameraBehindPlayer(playerid);
return 1;
}
Re: Help with Wanted -
Eliminator - 14.12.2013
Thanks dude! +rep Added ^_^
Re: Help with Wanted -
newbie scripter - 14.12.2013
pawn Код:
if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetVehiclePos(GetPlayerVehicleID(playerid), -1548.4060,-433.5984,6.0000);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 319.9333);
}
WTF??
u are only Teleporting the car not the player -__-
pawn Код:
if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new vid;
vid = GetPlayerVehicleID(playerid);
SetVehiclePos(GetPlayerVehicleID(playerid), -1548.4060,-433.5984,6.0000);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 319.9333);
PutPlayerInVehicle(playerid, vid, 0);
}