Help /vw
#1

i made a cmd and i doesent work..please help i want each player to set his own virtualworld PLease help!

Код:
 //----------------------------------[VW]-----------------------------------------------
 	if(strcmp(cmd, "/vw", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			new playa;
			tmp = strtok(cmdtext, idx);
			virid = strvalEx(tmp);
			{
			    if(IsPlayerConnected(playa))
			    {
							PlayerInfo[playa][pVirWorld] = virid;
							format(string, sizeof(string), "** You have set %s's (%d) virtual world to %d.", giveplayer,playa, virid);
			}
		}
		return 1;
	}
Reply
#2

please help me..im romanian
Reply
#3

pawn Код:
if(strcmp(cmd, "/vw", true) == 0)
{
    if(IsPlayerConnected(playerid)) {
        tmp = strtok(cmdtext, idx);
        if(!isnull(tmp)) return SendClientMessage(playerid, -1, "SYNTAX: /vw <Virtual World ID");
        new
            playa;
        tmp = strtok(cmdtext, idx);
        virid = strvalEx(tmp);
        if(IsPlayerConnected(playa)) {
            SetPlayerVirtualWorld(playa, virid);
            format(string, sizeof(string), "** You have set %s's (%d) virtual world to %d.", giveplayer,playa, virid);
        }
    }
    return 1;
}
Reply
#4

got errors please test it..try it and il give you an rep
Reply
#5

what errors?. post them so we can see
Reply
#6

Do you have strtok defined in your script?
EDIT:
Fixed code at my last post here.
Reply
#7

Quote:
Originally Posted by Dan_Barocu
Посмотреть сообщение
got errors please test it..try it and il give you an rep
How would you do this? u dont have rep
Reply
#8

Quote:
Originally Posted by thimo
Посмотреть сообщение
How would you do this? u dont have rep
Also, I dont think people find reputation points really important (Yes I know its in my signature, just to lazy to remove it)
Reply
#9

pawn Код:
if(strcmp(cmd, "/vw", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        tmp = strtok(cmdtext, idx);
        if(!isnull(tmp)) return SendClientMessage(playerid, -1, "SYNTAX: /vw <Virtual World ID");
        new virid;
        virid = strvalEx(tmp);
        SetPlayerVirtualWorld(playerid, virid);
        format(string, sizeof(string), "** You have set your virtual world to %d.", virid);
        SendClientMessage(playerid, -1,string);
    }
    return 1;
}
Reply
#10

i got a problem i put this at middle buy accident ..how do i repair it?i put my gm in middle please help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)