Help me please choose skins to the CMDTEXT
#1

Hello. I have with other countries badly know English language. Sorry for my English
But still you try to ask you for help.
I want to do - when the team /123 there was the choice of skin types as in the beginning as usual choose skin
Help pazhaluysta ..
If you have not understood what I want to write and I will try to explain the details.
please help.
Код:
	if (strcmp("/123", cmdtext, true, 4) == 0)
	{
return OnPlayerRequestClass(playerid)
	}
NOT WORKING.;(
Reply
#2

use SetupPlayerForClassSelection
Reply
#3

And you can just details, I new people in Pawno
Reply
#4

This?
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp(cmdtext, "/skin", true) == 0)
    {
        ForceClassSelection(playerid);
        SetPlayerHealth(playerid,0);
        return 1;
    }
  return 0;
}
Reply
#5

Yes in principle it is, thanks.
Or you may like the thread, so that in the place where the pressed command /skin after selecting a skin at the same place and stayed?
Reply
#6

Код:
new skinchange[MAX_PLAYERS];
new float:skinx;
new float:skiny;
new float:skinz;

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp(cmdtext, "/skin", true) == 0)
	{
		ForceClassSelection(playerid);
		SetPlayerHealth(playerid,0);
        GetPlayerPos(playerid, skinx, skiny, skinz);
        skinchange[playerid] = 1;

		return 1;
	}
  return 0;
}

public OnPlayerSpawn(playerid)
{
     if{skinchange == 1)
     {
        SetPlayerPos(playerid, skinx, skiny, skinz);
        skinchange[playerid] = 0;
     }
     return 1;
}
Thats exactly how it would work

Haven't tested, but seems fine to me
Reply
#7

error:
(452) : error 033: array must be indexed (variable "skinchange")
(454) : warning 213: tag mismatch
(454) : warning 213: tag mismatch
(454) : warning 213: tag mismatch
(497) : warning 213: tag mismatch
(497) : warning 213: tag mismatch
(497) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
--------
This line:
(450)public OnPlayerSpawn(playerid)
(451){
(452) if{skinchange == 1)
(453) {
(454) SetPlayerPos(playerid, skinx, skiny, skinz);
(455) skinchange[playerid] = 0;

(497) GetPlayerPos(playerid, skinx, skiny, skinz);
Reply
#8

Add
pawn Код:
new skinchange;
to the top of your script
Reply
#9

Not just new skin change, it must be like this

new skinchange[MAX_PLAYERS];
Reply
#10

Sorry, I didnt look at your code i just looked at your error
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)