Re: Script Request Thread #4 - Riddy - 26.09.2010
Can someone help me or not?
Re: Script Request Thread #4 -
Str4ndb3rg - 26.09.2010
Can someone make so that just a skin could write a special command?
Because i have a gate: /oygate (Openyakuzagate) but everyone can do it.
So can someone make so that only a special skin can?
Re: Script Request Thread #4 -
Str4ndb3rg - 26.09.2010
Quote:
Originally Posted by [HLF]Southclaw
an if statement + GetPlayerSkin
|
What?
I am a newbie pawner.
Re: Script Request Thread #4 -
Mauzen - 26.09.2010
Quote:
Originally Posted by Str4ndb3rg
What?
I am a newbie pawner.
|
https://sampwiki.blast.hk/wiki/GetPlayerSkin
Use this in an if condition just after your command if condition:
pawn Код:
if(strcmp(...)) //Your oygate command
{
if(GetPlayerSkin(playerid) != the_skin_id_that_is_allowed_to_open) return 1; //ends the command here
//your further normal gate code
...
}
Re: Script Request Thread #4 -
Luis- - 26.09.2010
Can someone make me a Job system;
I need;
Fort Carson Sheriff Dept
Fort Carson EMS
Fort Carson Government
Fort Carson Fire Dept
Thank you, Luis.
Re: Script Request Thread #4 -
Str4ndb3rg - 27.09.2010
[QUOTE=Mauzen;852690]
https://sampwiki.blast.hk/wiki/GetPlayerSkin
Use this in an if condition just after your command if condition:
pawn Код:
if(strcmp(...)) //Your oygate command
{
if(GetPlayerSkin(playerid) != the_skin_id_that_is_allowed_to_open) return 1; //ends the command here
//your further normal gate code
...
}
Код:
What i wrote:
[quote]
if(strcmp(cmdtext, "/Pgopen", true) == 0)
{
if(GetPlayerSkin(playerid) != 24) return 1; //ends the command here
new string[50];
new movetime = MoveObject(gate, -224.91983032,929.99670410,-8.98811340,5);
format(string, sizeof(string), "Prison Gates Are Opening", movetime);
SendClientMessage(playerid, 0xFF000000, string);
return 1;
}
The error.
Код:
C:\Users\Alle\Desktop\GTA SA Shit\GTA Server\gamemodes\EQ-RP.pwn(542) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
Re: Script Request Thread #4 - Riddy - 27.09.2010
Quote:
Originally Posted by Whatever your name is
[/code]
The error.
Код:
C:\Users\Alle\Desktop\GTA SA Shit\GTA Server\gamemodes\EQ-RP.pwn(542) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
|
Easy to fix mate you put it all in lines
Re: Script Request Thread #4 -
Str4ndb3rg - 28.09.2010
Quote:
Originally Posted by riddy123
Easy to fix mate you put it all in lines
|
Great thanks
New: How to make text on the peds when in the selection scene?
Re: Script Request Thread #4 -
ihatetn931 - 28.09.2010
I have been trying many diffrent way to convert this code to mysql but i just haven't found a way, I get it to work but it dosen't load as it's suppose to. It just shows blank info. A little help on how to convert this to mysql?
pawn Код:
format(str, sizeof(str), "Vehicles/Players/%s.cfg", plname);
if(dini_Exists(str))
{
strmid(PlayerVehicle[playerid][pVeh1], dini_Get(str, "Vehicle1"), 0, strlen(dini_Get(str, "Vehicle1")), 255);
strmid(PlayerVehicle[playerid][pVeh2], dini_Get(str, "Vehicle2"), 0, strlen(dini_Get(str, "Vehicle2")), 255);
strmid(PlayerVehicle[playerid][pVeh3], dini_Get(str, "Vehicle3"), 0, strlen(dini_Get(str, "Vehicle3")), 255);
strmid(PlayerVehicle[playerid][pVeh4], dini_Get(str, "Vehicle4"), 0, strlen(dini_Get(str, "Vehicle4")), 255);
strmid(PlayerVehicle[playerid][pVeh5], dini_Get(str, "Vehicle5"), 0, strlen(dini_Get(str, "Vehicle5")), 255);
return 1;
}
else
{
dini_Create(str);
strmid(PlayerVehicle[playerid][pVeh1], "None", 0, strlen("None"), 255);
strmid(PlayerVehicle[playerid][pVeh2], "None", 0, strlen("None"), 255);
strmid(PlayerVehicle[playerid][pVeh3], "None", 0, strlen("None"), 255);
strmid(PlayerVehicle[playerid][pVeh4], "None", 0, strlen("None"), 255);
strmid(PlayerVehicle[playerid][pVeh5], "None", 0, strlen("None"), 255);
//return 1;
}
This is OnplayerConnect, Basically what it does is if you own a vehicle it loads them. If you don't own a vehicle it sets all your vehicles to "None"
Oh and sscanf2 if possible
Re: Script Request Thread #4 -
Str4ndb3rg - 29.09.2010
Quote:
Originally Posted by Str4ndb3rg
Great thanks
New: How to make text on the peds when in the selection scene?
|
I still need help :/
Re: Script Request Thread #4 -
Lorenc_ - 28.10.2010
Quote:
Originally Posted by nickzanna
I do I need a registration filterscript (Not admin commands). : D
|
Errorcons (I think its his name) made a good register system, look forward into it (Its dialog)
Re: Script Request Thread #4 -
HippieOnSteriods - 29.10.2010
Hello I need the new includes OR a updated gamemode thats 0.3b for my RP server the script name is crpnew thats the name of it in the gamemodes folder :P please give the link or something that would upgrade it to 0.3b thank you in advance
Re: Script Request Thread #4 -
willsuckformoney - 29.10.2010
Re-Download SA-MP Server Package.
SA:MP Downloads
Re: Script Request Thread #4 -
oliver12 - 30.10.2010
Plz sameone make my skript:who BH a lot , that sent to the ajail.
(Sorry for my very bad English)
Re: Script Request Thread #4 -
Brian_Furious - 30.10.2010
Quote:
Originally Posted by oliver12
Plz sameone make my skript:who BH a lot , that sent to the ajail.
(Sorry for my very bad English)
|
I dont understand anything
Re: Script Request Thread #4 -
karakana7 - 30.10.2010
Can someone explain me what means == 0 in this code: if(strcmp(cmdtext, "/mycommand")
== 0).I think everyone know this code-begginer and also proffesional, but I want to know everything about that, because in another code 0 will be interprete like disabled and 1 like enabled, but in this code it's not disabled if player entered code matches text /mycommand.Thank you for the helping!
Re: Script Request Thread #4 -
WillyP - 30.10.2010
Quote:
Originally Posted by karakana7
Can someone explain me what means == 0 in this code: if(strcmp(cmdtext, "/mycommand") == 0).I think everyone know this code-begginer and also proffesional, but I want to know everything about that, because in another code 0 will be interprete like disabled and 1 like enabled, but in this code it's not disabled if player entered code matches text /mycommand.Thank you for the helping!
|
the == 0 at the end i think should be the length of the command itself?
Re: Script Request Thread #4 -
karakana7 - 30.10.2010
Quote:
Originally Posted by [FU]Victious
the == 0 at the end i think should be the length of the command itself?
|
So by you if the length of what typed player is equal to number 0(that means he typed nothing), than command will be executed?Lol that isn't normal, because he must enter the exact command like we writed in the script to get something done...
Re: Script Request Thread #4 -
Nero_3D - 30.10.2010
As far as I remember strcmp returns -1 is the first input it larger 0 if both are equal and 1 if the second input is larger and if the length of one input is zero it will aslo return 0 for fail
Re: Script Request Thread #4 -
Brian_Furious - 30.10.2010
Quote:
Originally Posted by [HLF]Southclaw
strcmp returns 0 if the two strings match so a quicker way to write that would be:
pawn Код:
if(!strcmp(cmdtext, "/command")) // you can add the ignorecase and length if you want.
if you want things super fast to write, make a little macro:
pawn Код:
#define Cmd(%1) if(!strcmp(cmdtext,%1,false,strlen(%1)))
// OnPlayerCommandText
Cmd("/mycommand") {
I use it and it works well.
|
Isnt a bad idea.But i think ZCMD is faster :P