2 Problems: Teleporting to a car, and a command to change skin. -
Sal - 23.09.2014
Код:
if (strcmp("/rcar", cmdtext, true, 10) == 0)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
new PlayerState = GetPlayerState(playerid);
if(strcmp(pName, "Sal", true, sizeof(pName)))
{
if(PlayerState == PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid, COLOUR_RED, "You cannot enter your car if you are in a vehicle");
return 1;
}
else
{
PutPlayerInVehicle(playerid, SalElegy, 0);
return 1;
}
}
return 1;
}
This does nothing at all. I do the command, and there is nothing. Not even a Unknown Command. Not sure what's going on here.
Код:
if(strcmp("/sal", cmdtext, true, 10) == 0)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
if(strcmp(pName, "Sal", true, sizeof(pName)))
{
SetPlayerSkin(playerid, 181);
SetPlayerColor(playerid, 0x266464);
return 1;
}
else
{
SendClientMessage(playerid, COLOUR_RED, "You are not Sal");
return 1;
}
}
This one straight up tells me I'm not Sal.
Re: 2 Problems: Teleporting to a car, and a command to change skin. -
killing - 23.09.2014
Can u explain in a better way ?
Re: 2 Problems: Teleporting to a car, and a command to change skin. -
Sal - 23.09.2014
Well, not really. That's all I can see happening. /rcar does nothing at all, like, it doesn't teleport me into SalElegy. and /sal says "You are not Sal" even when I am clearly joining with the username "Sal".
Re: 2 Problems: Teleporting to a car, and a command to change skin. -
Beckett - 23.09.2014
pawn Код:
if(strcmp("/sal", cmdtext, true, 10) == 0)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
if(strcmp(pName, "Sal", false, sizeof(pName)))
{
SendClientMessage(playerid, COLOUR_RED, "You are not Sal");
}
else
{
SetPlayerSkin(playerid, 181);
SetPlayerColor(playerid, 0x266464);
return 1;
}
}
Re: 2 Problems: Teleporting to a car, and a command to change skin. -
Don_Cage - 23.09.2014
pawn Код:
if(strcmp("/sal", cmdtext, true, 10) == 0)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
if(!strcmp(name,"Sal",true))
{
SetPlayerSkin(playerid, 181);
SetPlayerColor(playerid, 0x266464);
return 1;
}
else
{
SendClientMessage(playerid, COLOUR_RED, "You are not Sal");
return 1;
}
}