SA-MP Forums Archive
What's wrong ? - 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: What's wrong ? (/showthread.php?tid=188509)



What's wrong ? - marinov - 07.11.2010

Код:
	if(strcmp(cmdtext,"/putzombie", true, 10) == 0)
	{
 		new id = strval(cmdtext[11]); //this is the id of the player whos team your trying to change
		team[id] = 2;
		infected[playerid] = 0;
		SetPlayerPos(playerid,X,Y,Z);
		SetPlayerColor(playerid,ZRED);
		SetPlayerTeam(playerid, 2);
		SetPlayerHealth(playerid, 200);
 		SetPlayerSkin(playerid,162);
		GameTextForPlayer(playerid,"~r~Zombie: ~b~/hide",10000,1);
  		return 1;
	}
when I try it my server crashes


Re: What's wrong ? - WillyP - 07.11.2010

Quote:
Originally Posted by marinov
Посмотреть сообщение
Код:
	if(strcmp(cmdtext,"/putzombie", true, 10) == 0)
	{
 		new id = strval(cmdtext[11]); //this is the id of the player whos team your trying to change
		team[id] = 2;
		infected[playerid] = 0;
		SetPlayerPos(playerid,X,Y,Z);
		SetPlayerColor(playerid,ZRED);
		SetPlayerTeam(playerid, 2);
		SetPlayerHealth(playerid, 200);
 		SetPlayerSkin(playerid,162);
		GameTextForPlayer(playerid,"~r~Zombie: ~b~/hide",10000,1);
  		return 1;
	}
when I try it my server crashes
LOL

pawn Код:
SetPlayerPos(playerid,X,Y,Z);
Don't just copy and paste code that is given to you.


Re: What's wrong ? - marinov - 07.11.2010

why not ? it is not working anyways


Re: What's wrong ? - WillyP - 07.11.2010

Actually read the code..

This forum requires that you wait 120 seconds between posts. Please try again in 11 seconds.


Re: What's wrong ? - marinov - 07.11.2010

I'm really new at coding and english is not my first language, so its kinda hard to understand PAWNO

PS: YOUR STUNT SERVER IS FREAKING AWESOME


Re: What's wrong ? - marinov - 07.11.2010

and

Код:
SetPlayerPos(playerid,X,Y,Z);
is not the problem, it still crashes


Re: What's wrong ? - Scenario - 07.11.2010

Quote:
Originally Posted by marinov
Посмотреть сообщение
and

Код:
SetPlayerPos(playerid,X,Y,Z);
is not the problem, it still crashes
You don't even know what you're talking about, so you can't say something is or isn't the problem. Why don't you read your code before it's given to you? It just shows how much of a newb you are.


Re: What's wrong ? - Th3Angel - 07.11.2010

Why do you even need this when playerid is available...
Код:
new id = strval(cmdtext[11]); //this is the id of the player whos team your trying to change
pawn Код:
if(strcmp(cmdtext,"/putzombie", true, 10) == 0)
    {
        team[playerid] = 2;
        infected[playerid] = 0;
        SetPlayerPos(playerid,X,Y,Z);
        SetPlayerColor(playerid,ZRED);
        SetPlayerTeam(playerid, 2);
        SetPlayerHealth(playerid, 200);
        SetPlayerSkin(playerid,162);
        GameTextForPlayer(playerid,"~r~Zombie: ~b~/hide",10000,1);
        return 1;
    }



Re: What's wrong ? - WillyP - 07.11.2010

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
You don't even know what you're talking about, so you can't say something is or isn't the problem. Why don't you read your code before it's given to you? It just shows how much of a newb you are.
As I tried to tell him. Eesh, SAMP will never have enough noobs.


Re: What's wrong ? - -Rebel Son- - 07.11.2010

Quote:
Originally Posted by [FU]Victious
Посмотреть сообщение
As I tried to tell him. Eesh, SAMP will never have enough noobs.
If your not contributing help, then dont post.


@marinov: Read the wiki about sscanf. It's not that hard